android – “403 – usageLimits”在youtube api上

我从我的
Android应用程序到YouTube API的调用中得到了这个JSON响应:

"error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "ipRefererBlocked",
    "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.",
    "extendedHelp": "https://console.developers.google.com"
   }
  ],
  "code": 403,
  "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."
}

我的url是正确的(根据youTube search list)

我在某处读到了我应该发送一个浏览器密钥而不是一个android-key,但它不起作用.

最佳答案 这个错误对我来说很明显:

您的网址很好,但您刚刚超过了Youtube API上的配额.

There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions.

我相信这仍然是真的:

Version 3 of the YouTube Data API has concrete quota numbers listed in the Google API Console where you register for your API Key. You can use 30,000 units/second/user and 50,000,000 per day.

点赞