Google static Maps always returning 403 when a key is provided
Asked Answered
A

1

3

I always get a 403 Forbidden response if I provide an API key within the map request; without specifying it everything goes well and I can get to the map. The problem is that I have to work with an API key in order to monitor usage and per-user quota.

Here's an example: http://jsfiddle.net/demerzel3/ZUC6m/

http://maps.googleapis.com/maps/api/staticmap?key=AIzaSyDqq140S23Q_H_dmyUIFz-YwsbH_rCSFSs&size=320x140&scale=2&zoom=15&sensor=false&markers=color:0xEE6B1C|label:A|V.%20FALCONE%207%20CASALETTO%20LODIGIANO%20(LO)

In the example above I'm using a registered API Key configured in order to allow jsfiddle as a referer (I can attach a screenshot of the API Console if necessary). What am I doing wrong?

Thanks

Amphoteric answered 11/7, 2013 at 15:56 Comment(0)
A
10

I finally sorted things out, the problem was that I was subscribing to the "Google Maps API v2" service instead of "Static Maps API".

Switching them in the API console fixed the problem.

Amphoteric answered 16/7, 2013 at 8:36 Comment(2)
I also had the same problem, and this was the exact fix. Google returns a 403 but with no other message as to why you got that error.Monocot
Also check to be sure you're using the right key for the specific project you're working on (I made this mistake)Jaye

© 2022 - 2024 — McMap. All rights reserved.