gpt4 book ai didi

google-api - 错误: invalid_client no registered origin

转载 作者:行者123 更新时间:2023-12-03 06:18:19 24 4
gpt4 key购买 nike

我已在我的网络服务器上安装了 Google Drive Realtime API 示例文件,如下 these instructions ,包括在 Cloud Console 中生成 client_id 并将其插入到 index.html 文件中。

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

Error: invalid_client
no registered origin

请求详细信息是:

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

我在 Cloud Console 中看不到应使用的任何其他 client_id。有谁知道如何克服这个错误?感谢您的帮助。

最佳答案

在新的 Google API 控制台中,配置您的 OAuth2.0 授权来源

Your Project > APIs & auth > Credentials

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

Create Client ID > Web Application > Authorized Javascript origins

如果您在本地开发服务器上运行,只需添加确切的 URL,例如:

http://127.0.0.1:9000

关于google-api - 错误: invalid_client no registered origin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19633590/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com