错误:invalid_client没有注册的来源 [英] Error: invalid_client no registered origin

查看:177
本文介绍了错误: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=https://www.googleapis.com/auth/drive.install https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/plus.me
response_type=token
access_type=online
redirect_uri=postmessage
proxy=oauth2relay865404532
origin=http://mywebsite.com
state=264939258|0.165356673
display=page
client_id=1077585001321.apps.googleusercontent.com
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 :

http://127.0.0.1:9000

这篇关于错误:invalid_client没有注册的来源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆