2

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..?

Muhammad Ashraf
  • 1,252
  • 1
  • 14
  • 32

3 Answers3

2

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

Rafat touqir Rafsun
  • 2,777
  • 28
  • 24
1

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

Muhammad Ashraf
  • 1,252
  • 1
  • 14
  • 32
0

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

Hudson Pereira
  • 1,066
  • 8
  • 13