android - YouTube Api - 无法搜索 : com. google.api.client.googleapis.json.GoogleJsonResponseException:403 禁止

标签 android json youtube youtube-api

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

有什么想法吗..?

最佳答案

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

关于android - YouTube Api - 无法搜索 : com. google.api.client.googleapis.json.GoogleJsonResponseException:403 禁止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28356313/

相关文章:

Android:检查耳机是否插入

c# - 如何在没有 JSON.NET 库的情况下解析 JSON?

json - 在 Azure 数据工厂中解析复杂的 JSON

youtube - 从 channel 而非特定的现场直播视频中检索YouTube live_stats并发观众

api - 将youtube音频序列与本地视频一起使用

android - 数组适配器在后台异常中修改

java - 如何在我的自定义 ListView 中使用搜索功能(从网站获取数据并在 ListView 中显示)

android: google map api 总是从非洲开始显示

json - PowerShell 调用-WebRequest | API调用

android - YouTube数据API,某些视频不返回 channel