Request failed. (Requests from referer are blocked.)
-
This is Resolved – but I wanted to post it here to hopefully save someone else the hour it just took me to sort out.
Compliment sandwich: We LOVE your plugin by the way! Thank you so much for offering a free version for us small startups with basic needs!
Not sure when the issue started, but client had been using this plugin and the YouTube API for several years without issue. Nothing changed that should have had any effect on the connection.
Trying to add a video for this client’s blog post and kept getting “Request failed. (Requests from referer?are blocked.)” I searched on here for mention of “request failed” and your website – found nothing. Went to google. There I found threads discussing API issues. I went into VWP’s settings in WP admin to “Test API” and it failed, giving this response:
{ “error”: { “code”: 403, “message”: “Requests from referer \u003cempty\u003e are blocked.”, “errors”: [ { “message”: “Requests from referer \u003cempty\u003e are blocked.”, “domain”: “global”, “reason”: “forbidden” } ], “status”: “PERMISSION_DENIED”, “details”: [ { “@type”: “type.googleapis.com/google.rpc.ErrorInfo”, “reason”: “API_KEY_HTTP_REFERRER_BLOCKED”, “domain”: “googleapis.com”, “metadata”: { “consumer”: “projects/[/*omitted by Abby*/]”, “service”: “youtube.googleapis.com” } } ] } }
Your API tutorial video mentioned not restricting the API in case of domain name change, but that has not /will not be happening in my client’s case. I also had every wildcard version of the domain in the allowed domains. The only thing that fixed it was changing Application Restrictions to None. I did add an API restriction for only YouTube Data API v3, just to have some protection, and it’s working fine with that.
So we’re all set, but if anyone encounters this, go to Google’s API Console and change your API’s application restrictions to “None” and Test again in a few minutes.
Also, a FYI that your API help video and the Help Doc’s screenshots/descriptions for Google Cloud are outdated. I know it changes so often, but it might be nice to at least add a few of the section name changes and added complexities. I wish it was still as simple as it was back then…
Thanks again for the great plugin!
- The topic ‘Request failed. (Requests from referer are blocked.)’ is closed to new replies.