After several months of stability at 100%, today I get 403 error in Google Maps services

I'm just wondering if anyone can shed some light on why I see 403 Prohibited Errors for my Google Map Services.

I downloaded api maps as such:

<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?libraries=places&amp;sensor=false"></script> 

And then using the geocoding and autocomplete libraries to include user searches in the coordinates to display search results on the map.

This worked fine (for several months) until yesterday, when I started looking at 403 errors whenever the Autocomplete service was accessed.

I am 100% sure that I did not reach the 25k per day query limit, and I did not make any code changes on my side.

Now I have added an API key to my script loading and the problem has disappeared, but I want to be sure that this will not happen again. Search by location is the main feature of our site, and if it breaks, we lose customers.

Does anyone have any idea why this could happen?

And under what circumstances can this happen again?

+3
google-maps-api-3 geocoding
source share
2 answers

This problem has just reappeared even with the API key set , and I think the problem is actually caching google javascript maps.

I have my web server that dynamically decides which javascript merges, minimizes and caches locally. This is done using RequestReduce .

When client-side javascript becomes obsolete (about 3 days in my case) - google returns 403 unauthorized.

The API key was just a red herring. I can delete the key and my code is still working - while the js cards are "fresh".

In my case, the fix was to add maps.googleapis.com to the RequestReduce list:

 javascriptUrlsToIgnore="maps.googleapis.com" 

For others, just make sure you don't cache javascript maps.googleapis.com for more than a few hours, if at all possible.

+12
source share

Recently, the Google JavaScript JavaScript API has advanced a slight increase in increment to 3.9 changelog , and the default version, expanded from 3.6 to 3.7. I noticed that you are not specifying the version in the URL that you use to download the Google Maps JavaScript API library, so you get the default version of 3.7. One important thing in version 3.7 is that keys are now required for some libraries. Information about which version you should use is available in the Versions section of the Developer's Guide .

Several others have encountered similar problems, but if you work fine after adding the key, you should be good. If you want to be notified of future changes to the Google Maps API, you can sign up for notifications .

+3
source share

All Articles