我遵循这些说明,在我的网络服务器上安装了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
发布评论