YouTube API权限403禁止错误

我正在遵循此页面上的教程,但是在运行应用程序并尝试进行搜索时,我一直收到403 Forbidden错误。

我在https://console.developers.google.com/页面上启用了Youtube

Data API v3,并创建了一个Android API密钥。

有什么建议?谢谢。

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."

}

回答:

我已经通过创建浏览器密钥而不是android密钥解决了该问题。浏览器密钥不需要输入,以便显示“允许所有引用”

以上是 YouTube API权限403禁止错误 的全部内容, 来源链接: utcz.com/qa/412822.html

回到顶部