Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube API v3 ipRefererBlocked

I try to search using the Youtube API.

but, received this message 'ipRefererBlocked'

http://i.stack.imgur.com/sc0dx.png

The following image is my API settings

http://i.stack.imgur.com/6uBeh.png

please give me the way.

like image 534
Lemon Knife Avatar asked Oct 18 '22 06:10

Lemon Knife


1 Answers

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 P or referer should be allowed. Your request was blocked because it came from an IP address that didn't match the IP restrictions for that key.

That implies you have created a server API key, while what you want is an ios client API key. Make sure you are requesting the YouTube scope as part of sign in as well.

Every request must either specify an API key or provide an OAuth 2.0 token. Your API key is available in the Developer Console's API Access pane for your project.

Here's a related SO ticket, you may use the work around offered by community: Youtube API permission 403 Forbidden error and YouTube Api - Could not search: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden

like image 108
Android Enthusiast Avatar answered Oct 21 '22 05:10

Android Enthusiast