错误:invalid

编程入门 行业动态 更新时间:2024-10-21 04:01:04
本文介绍了错误:invalid_client没有注册的来源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我遵循这些说明,在我的网络服务器上安装了Google Drive Realtime API示例文件,包括在云端控制台中生成client_id并将其插入到 index.html 文件中。

I have installed the Google Drive Realtime API sample files on my web server, following these instructions, including generating a client_id in the Cloud Console and inserting it into the index.html file.

当我访问页面,然后点击按钮授权应用程序,它会弹出一个新窗口并显示:

When I visit that page and click the button to authorize the app, it pops up with a new window and shows:

错误:invalid_client strong> 没有注册来源

Error: invalid_client no registered origin

请求详细信息包括:

The Request Details are:

openid_connect_request=true cookie_policy_enforce=false scope=www.googleapis/auth/drive.install www.googleapis/auth/drive.file www.googleapis/auth/plus.me response_type=token access_type=online redirect_uri=postmessage proxy=oauth2relay865404532 origin=mywebsite state=264939258|0.165356673 display=page client_id=1077585001321.apps.googleusercontent authuser=0

我无法看到我应该在云控制台中使用的任何其他client_id。有谁知道如何克服这个错误?感谢您的帮助。

I can't see any other client_id that I should be using in the Cloud Console. Does anybody know how to overcome this error? Thanks for your help.

推荐答案

在新的Google API Console中,从

In the new Google API Console, configure your OAuth2.0 authorized origins from

Your Project > APIs & auth > Credentials

您可能需要专门为Web应用程序添加一个新的客户端ID(我这样做是因为默认用于AppEngine)

You might need to add a new Client ID specifically for a web application (I did because the default was for AppEngine)

Create Client ID > Web Application > Authorized Javascript origins

如果您在本地开发服务器上运行,只需添加以下URL:

If you are running on a local dev server, just add the exact URL such as :

127.0.0.1:9000

更多推荐

错误:invalid

本文发布于:2023-11-12 04:13:10,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   invalid

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!