本文介绍了的Youtube API权限403 Forbidden错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下面的教程这个页面,但我不断收到403禁止错误,当我运行的应用程序,并尝试做一个搜索。

我启用的 https://console.developers.google.com/ 页面和我创建一个Android API密钥。

有什么建议?谢谢你。

 无法搜索:com.google.api.client.googleapis.json.GoogleJsonResponseException:403禁止
{
code:403,
错误:[{
域:usageLimits
消息:有一个每个IP或每个引用站点的API键配置限制和要求不符合这些限制,请使用谷歌开发者控制台,如果从这个IP或引荐请求应该更新您的API密钥配置。被)允许。,
原因:我prefererBlocked
extendedHelp:https://console.developers.google.com
}],
消息:有一个每个IP或每个引用站点的API键配置限制和要求不符合这些限制,请使用谷歌开发者控制台,如果从这个IP或引荐请求应该更新您的API密钥配置。被)允许。
}
 

解决方案

我已经通过创建一个浏览器键,而不是一个机器人的关键解决了这个问题。浏览器关键需要有任何条目,以便它会说:所有refered允许

I'm following the tutorial on this page but I keep getting a 403 Forbidden error when I run the app and try to do a search.

I enabled Youtube Data API v3 on the https://console.developers.google.com/ page and I created an Android API key.

Any suggestions? Thank you.

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."
}
解决方案

I have resolved the problem by creating a Browser key instead of an android key. The browser key needs to have no entry so that it'll say "all refered allowed"

这篇关于的Youtube API权限403 Forbidden错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 02:00