我一直关注this tutorial来创建Youtube应用程序..我创建了Browser-Android API Key并在我的项目中尝试了它们。但是当我尝试运行它并搜索时我得到:
Could not search: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "usageLimits",
"message" : "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.",
"reason" : "ipRefererBlocked",
"extendedHelp" : "https://console.developers.google.com"
} ],
"message" : "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed."
}
任何想法......?
答案 0 :(得分:2)
你所要做的就是: 删除/编辑Referers为“允许任何引用” “浏览器应用程序的关键”。
答案 1 :(得分:1)
通过将浏览器api的引用设置为允许的任何引用来修复问题。
答案 2 :(得分:0)
将其设置为"允许任何引用者"擦除所有引用允许的输入很容易。