For duplicate-tempted visitors: I'm aware of all similar issues but mine is not solved by them
I'm developing locally a react app and my code looks like:
<Script
url={`https://maps.googleapis.com/maps/api/js?key=${process.env.REACT_APP_GOOGLE_PLACES_API_KEY || ""}&libraries=places` }
onLoad={ this.handleScriptLoad }
/>
and my console looks like:
But I still get:
Google Maps JavaScript API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error Your site URL to be authorized: http://localhost:3000/
And I have waited for 2+ hours
in the form after "My web site URL:". The API key they give you works for your localhost.
I struggled with the same problem but this seemed to work for me:
http://localhost/
Just make sure you click "Save" below
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With