user2336424
user2336424

Reputation: 73

Google Maps API V3 error: 403 (Forbidden access for too many pageviews)

I have a published layer in Google Maps Engine that I am attempting to display using the Google Maps V3 API. In GME, the layer's "Shared with" access list includes my user and the "API access" access list also includes by user.

I am making the Maps V3 API call using MapsEngineLayer from the visualization library, and setting the appropriate auth token and layer asset id as part of the layerOptions.

The API call is failing with the error message: Google Maps API V3 error: 403 (Forbidden access for too many pageviews)

The URL looks like:

https://earthbuilder.googleapis.com/my_gme_layer_asset_id-4/maproot/json? output=jsonp&access_token=my_auth_token&callback=xdc._tsel5i

I have found some discussion threads related to "403" and "forbidden", but am having difficulty figuring out the meaning of (and solution to) the "too many pageviews" issue.

Any suggestions would be appreciated.

Upvotes: 7

Views: 30661

Answers (2)

Arnold Roa
Arnold Roa

Reputation: 7738

If you tried with @David solution and it doesnt work. It worths to check that you are not caching (or storing locally) the google maps js script. Google don't allow that. If you serve that file it will work for about 3 days and then stop working.

Upvotes: 13

David Freitag
David Freitag

Reputation: 2272

How many requests have you made so far today, there are usage limits on the Maps API that may be preventing you from requesting any further data.

https://developers.google.com/maps/faq#usagelimits

Although it does seem unlikely that you have hit their hard set 25,000 requests, you may want to make sure that you aren't accidentally DOSing them with http requests. That sort of thing will invariably burn through your limit, and potentially place your IP on a blacklist.

Also, you should check the Maps API Reference materials, i think you may be trying to use a deprecated API.

https://developers.google.com/maps/documentation/webservices

Your http request should look more like this:

http://maps.googleapis.com/maps/api/service/output?parameters

Where output is either json or xml.

edit: The Maps API Help page is located here.

Upvotes: 7

Related Questions