Youtube请求被阻止

Mul*_*ard 5 android youtube-api android-youtube-api

我想使用Android Youtube API,因为我在谷歌控制台中创建了一个API密钥并将其添加到我的项目中.现在,当我执行Youtube查询时,我收到以下消息:

04-25 16:41:05.899: W/System.err(7213): com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
04-25 16:41:05.900: W/System.err(7213): {
04-25 16:41:05.900: W/System.err(7213):   "code" : 403,
04-25 16:41:05.900: W/System.err(7213):   "errors" : [ {
04-25 16:41:05.900: W/System.err(7213):     "domain" : "usageLimits",
04-25 16:41:05.900: W/System.err(7213):     "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.",
04-25 16:41:05.900: W/System.err(7213):     "reason" : "ipRefererBlocked",
04-25 16:41:05.900: W/System.err(7213):     "extendedHelp" : "https://console.developers.google.com"
04-25 16:41:05.900: W/System.err(7213):   } ],
04-25 16:41:05.900: W/System.err(7213):   "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."
04-25 16:41:05.900: W/System.err(7213): }
Run Code Online (Sandbox Code Playgroud)

我还需要做些什么来让谷歌不阻止我的请求?每位用户的请求限制为每天3000,我使用了0.

joh*_*h10 2

在您的 Google 开发人员仪表板中,单击“凭据”并查看您的 API 密钥是按引荐来源网址还是按 IP 设置。如果受到限制,请确保它与您的引荐来源网址或 IP 匹配。

公共API访问