I am getting the error RefererNotAllowedMapError
from some PC's when I load a page on my site.
RefererNotAllowedMapError
The current URL loading the Google Maps JavaScript API has not been added to the list of allowed referrers. Please check the referrer settings of your API key on Google Cloud Console.
See API keys
It works OK on FireFox from 3 out of four of the machines I have tested.
Generally this would mean that the domain is not added as a referer in my API console but it definitely is, and it definitely works on other machines.
Anyone else had this issue or able to provide some guidence?
For me to use
Places API
I had to turn onMaps JavaScript API
The solution to every/such
Maps Javascript API
error varies for different scenarios for different developers. A list of errors with detailed description is given by google hereNevertheless please refer the below snap:
/*
after the domain url likehttp://www.telesuprecon.com/*
will make the request possible from any page within your website.The only thing that worked for me was to create a brand new key w/no restrictions, including no API restrictions.
This won't be a working solution in the production environment, but it allows us to move ahead w/development.
I had a similar issue where I was trying to use the API but had it restricted to Map product only. It generated the same error even though http referrer box had nothing in it (open for all). The problem went away after recreating a new key without any product restriction.
Note the DOT at the beginning of the expression, it's a char!
*.stackoverflow.com/*
// this will not work withhttp://stackoverflow.com
You will also have to add:
*://stackoverflow.com/*
// now it will cover all domain variationTry to add all type of urls like:
Definitely it will work.