Google Maps api REQUEST_DENIED when using restrictions and API keys

I enjoyed using the Geocoding API from Maps for several years, no problem. I recently made more keys for different environments and decided that it would be nice 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 you to access the API again.


This is a setting for keys. We have only two APIs, and they are added to this key. In this configuration, I cannot name the geocoding API. When I remove the restrictions that Key works again, no problem. I have not set any other application restrictions.


API Restrictions Page

+4
3
+9

. , API Restrictions API. , , . , .

+3

. , @user8960608 .

, , , . API.

So, while I don’t know the answer, I can only assume that these restrictions do not work with Geocode at least? Perhaps this table is here: https://developers.google.com/maps/faq#using-google-maps-apis may indicate that they are not yet in use, or perhaps the documents are not yet updated.

Now we just IP restrict the key, not perfect, but begin.

+1
source

Source: https://habr.com/ru/post/1689426/


All Articles