Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google maps api REQUEST_DENIED when using API restrictions & key

Tags:

google-maps

I have been happily using the Geocoding API from Maps for some years, with no problem. Recently I've made more keys, for different environments, and decided it would be a good idea to add API restrictions to them.

When I add these API restrictions, I suddenly start getting REQUEST_DENIED.

https://maps.googleapis.com/maps/api/geocode/json?latlng=={lt},{ln}&key={key}

This IP, site or mobile application is not authorized to use this API key, ...
REQUEST_DENIED

Removing them allows the APIs to be called again.


This is the setup for the keys. We only have 2 APIs enabled, and they are both added to this key. In this configuration I can't call the Geocoding API. When I delete the restrictions the Key works again, no problem. I've not set up any other app restrictions.


API Restrictions Page

like image 921
Andrew Avatar asked Dec 07 '22 16:12

Andrew


1 Answers

Google is now aware of the bug and it was reported in the public issue tracker:

https://issuetracker.google.com/issues/69715011

Please star the bug to add your vote and subscribe to notifications from Google. Hopefully they will fix the issue soon.

UPDATE

The bug was fixed on Google side in March 2018.

like image 53
xomena Avatar answered Jun 04 '23 12:06

xomena