Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android YouTube Api-无法搜索:com.google.Api.client.googleapis.json.googlejson响应异常:403禁止_Android_Json_Youtube_Youtube Api - Fatal编程技术网

Android YouTube Api-无法搜索:com.google.Api.client.googleapis.json.googlejson响应异常:403禁止

Android YouTube Api-无法搜索:com.google.Api.client.googleapis.json.googlejson响应异常:403禁止,android,json,youtube,youtube-api,Android,Json,Youtube,Youtube Api,我一直在关注创建Youtube应用程序。。我创建了浏览器Android API密钥,并在我的项目中尝试了这两个密钥。。但当我尝试运行它并搜索时,我得到: Could not search: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden { "code" : 403, "errors" : [ { "domain" : "usageLimits", "

我一直在关注创建Youtube应用程序。。我创建了浏览器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."
 }

有什么想法吗?

通过将浏览器api的引用设置为允许的任何引用来解决问题。

您所要做的就是: 从“允许的任何引用”部分删除/编辑引用
“用于浏览器应用程序的键”。

将其设置为“允许任何引用程序”很容易,就像删除所有允许引用程序的输入一样。

我这样做了,我确信它是正确的。:我有API密钥和serch EngineId,尽管我有错误。所以我认为在我的例子中,如果需要填写账单信息,那么使用API是否需要填写账单信息?