Google API:不是客户端的有效来源:url 尚未被列入客户端 ID“ID"的白名单 [英] Google API: Not a valid origin for the client: url has not been whitelisted for client ID "ID"
问题描述
我需要帮助.我没有找到我的问题的答案.我尝试使用谷歌搜索并尝试询问其他方面,但我从未找到答案.
I need help. I don't found an answer to my question. I tried googling and I tried asking on other sides but I never found an answer.
我正在使用 google API(Youtube 数据 API),我使用了 google 端的示例代码,它的工作代码我对此非常确定.当我尝试启动脚本时出现错误:
I'm working with the google API (Youtube data API) and I use the example code from the google side the code it works I'm pretty sure about that. I got an error when i try to start the Script:
详细信息:不是客户端的有效来源:MyURL";尚未被列入客户端 IDMyID"的白名单.请转至 https://console.developers.google.com/ 并将此来源列入您项目的白名单客户 ID."
details: "Not a valid origin for the client: "MyURL" has not been whitelisted for client ID "MyID". Please go to https://console.developers.google.com/ and whitelist this origin for your project's client ID."
错误:idpiframe_initialization_failed"
error: "idpiframe_initialization_failed"
问题我将我的网站列入白名单并被接受.我不知道出了什么问题.我应该怎么做白名单"?我的域(已列入白名单)
The problem i whitelisted my Website and it's accepted. i don't know what is wrong. What should i do to "whitelist" my Domain (It's whitelisted)
还有一个问题.我之前没有搜索过这个问题的答案.
And another question. I did not search for an answer on this question before.
我认为我可以在本地主机上使用代码,我认为我必须将我的本地主机地址或类似的内容列入白名单.但白名单不起作用.
I think it's possible that I can use the code on Localhost, I think I must whitelist my localhost address or something like this. But whitelisting does not work.
- DreamGamer
推荐答案
遇到了同样的问题,我是这样解决的:
Had the same problem and here's how I solved it:
- 在您的项目中同时激活 Analytics API 和 Google Plus API
- 创建新的 OAUTH 2.0 客户端凭据
- 在限制部分下添加Authorized Javascript Origins
享受.
这篇关于Google API:不是客户端的有效来源:url 尚未被列入客户端 ID“ID"的白名单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!