2
votes

I have been following this tutorial to create Youtube application.. I created Browser-Android API Key and tried both of them in my project.. But when I try to run it and search I get:

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."
 }

Any Idea..?

3
I did, and I'm sure it's the right one.. :S - Muhammad Ashraf

3 Answers

2
votes

All you've to do is : Remove/Edit Referers to "Any referer allowed" from the section of "Key for browser applications" .

1
votes

Problem fixed by setting the referers of the browser api to any referer allowed.

0
votes

Setting it to "Any referer allowed" is easy as erasing all referer allowed inputs.