web-dev-qa-db-ja.com

Youtube API許可403 Forbiddenエラー

this ページのチュートリアルに従っていますが、アプリを実行して検索しようとすると403 Forbiddenエラーが発生し続けます。

https://console.developers.google.com/ ページでYoutube Data API v3を有効にし、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."
}
21
kj tolentino

Androidキーの代わりにブラウザキーを作成することで問題を解決しました。「すべての参照が許可されました」と表示されるように、ブラウザキーにはエントリがない必要があります。

36
kj tolentino

これをiOSアプリに使用して同じエラーを受け取ったので、バンドルIDを削除し、それが機能しました

2
Silviu St

IOSキーではなくサーバーキーを作成して問題を解決しました

1
MK_iOS

同じ問題があり、多くの時間を無駄にした後、私のホスティングサービスは、APIリクエストが私のウェブサイトに関連付けられているものとは異なるIPアドレスによって生成されていることを突き止めました。

1
Rob Fenwick