“403 - 使用限制"在 youtube api 上 [英] "403 - usageLimits" on youtube api

查看:199
本文介绍了“403 - 使用限制"在 youtube api 上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have this JSON response from my call from my android App to YouTube API:

"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 搜索列表)

My url is correct (acoording to youTube search list)

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

I read somewhere that I should send a browser-key and NO an android-key, but it doesn't work.

推荐答案

这个错误在我看来很清楚:

The error seems clear to me:

您的网址不错,但您刚刚超出了 Youtube API 的配额.

在您的 API 密钥上配置了每个 IP 或每个引用者限制,并且请求与这些限制不匹配.

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

我相信这仍然是真的:

YouTube 数据 API 的第 3 版在您注册 API 密钥的 Google API 控制台中列出了具体的配额编号.您可以使用 30,000 个单位/秒/用户和每天 50,000,000 个单位.

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.

这篇关于“403 - 使用限制"在 youtube api 上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆