Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube Request gets blocked

I wanted to use the Android Youtube API for that i created an API key in google console and added it to my project. Now when i execute a Youtube Query i get the following message:

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): }

What else do i have to do to make google not blocking my request? The request limit per user is 3000 per day and i used 0 of it.

like image 892
Mulgard Avatar asked Nov 01 '22 05:11

Mulgard


1 Answers

In your Google developer dashboard click on Credentials and see if your API key is set by referrer or by IP. If it's limited make sure it matches your referrer or IP.

Public API access

like image 95
johnh10 Avatar answered Nov 12 '22 21:11

johnh10