0

I'm getting a consistent 403 forbidden error from Google Maps API, although I'm linking the API properly and am far from the request limits and using neither "client" nor "signature."

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3.4&key=AIzaSyDuaKJpqDygX3vtsLQuybrIcL6fmu-6Ht8&sensor=true"></script>

The issue is appearing here: http://local.americawantstowork.org/labor2014

Any ideas? The other pages using this exact code have no issues at all. :(

  • [similar question: After months of 100% stability, today I get 403 Error on google maps services](http://stackoverflow.com/questions/10719319/after-months-of-100-stability-today-i-get-403-error-on-google-maps-services) – geocodezip Aug 28 '14 at 20:49
  • [similar question: Google map on load showing error](http://stackoverflow.com/questions/18628683/google-map-on-load-showing-error) – geocodezip Aug 28 '14 at 20:54

2 Answers2

2

This page (can't say about the others, you didn't provide links to "working" pages) is including the Google Maps Javascript API v3 twice, once legally, once with local code copied from Google's servers (which is against the terms of service:

1st include (per documentation, includes the earliest version of the API available, not 3.4)):

<!-- include google maps if required -->
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3.4&key=AIzaSyDuaKJpqDygX3vtsLQuybrIcL6fmu-6Ht8&sensor=true"></script>

2nd include (copies of Google's loader and main.js files on your local server):

<!-- include google maps if required -->
<script type="text/javascript" src="/javascripts/js"></script>
<script src="javascripts/main.js" type="text/javascript"></script>

from the last:

 getScript("http://maps.gstatic.com/mapfiles/api-3/15/21/main.js");

version 3.15 was just retired, so that will no longer work. (explains why it just "broke")

geocodezip
  • 158,664
  • 13
  • 220
  • 245
0

I also saved the Google Maps file locally and it stopped working after some time. I needed to add ?v=3.exp to the end of my URL to get it working https://maps.googleapis.com/maps/api/js?v=3.exp

The answer from @geocodezip helped me. I can't comment because my reputation isn't high enough.

Jason Deppen
  • 171
  • 3