static maps return 403 forbidden when embedded in img tag, unless I use an api key

3,281 views
Skip to first unread message

matteo sisti sette

unread,
Dec 8, 2011, 3:46:07 PM12/8/11
to google-maps-ap...@googlegroups.com
Hi,

I'm using the static maps api to get map images.

If I pu that url in the address bar of the browser directly, it works fine; however if I use it as the src attribute of an img tag, I get a 403 forbidden response.

Everything is fixed if I include my api key (and use it on my domain, of course), that is:


Now, isn't the api key supposed to not be needed any more??????? The documentation doesn't mention api keys at all.

Is this a bug?

Felipe Kautzmann de Mello

unread,
Apr 11, 2012, 8:55:57 AM4/11/12
to google-maps-ap...@googlegroups.com
Hi Matteo,

Did you get any workaroud for this one?

Thanks!

Felipe

Barry Hunter

unread,
Apr 26, 2012, 9:27:41 AM4/26/12
to google-maps-ap...@googlegroups.com
That is the old API. It required a key. You are getting an error
because when dont have a key.

Use the new API instead
https://developers.google.com/maps/documentation/staticmaps/
(there is a link to an upgrade guide on that page)
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps API Web Services" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-maps-api-web-services/-/N6HVwYyBBBAJ.
>
> To post to this group, send email to
> google-maps-ap...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-api-web-...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api-web-services?hl=en.

Felipe K. de Mello

unread,
Apr 26, 2012, 10:29:38 AM4/26/12
to google-maps-ap...@googlegroups.com
Hi Man thanks,

I've checked that documentation and I saw that it's not necessary to include the key anymore, is that true?
Are you passing the key on the new API?

I'm also facing troubles with the Translator API, same forbidden problem.

Thanks for your time, I really apreciate it.

Best Regards,

Felipe K. Mello
Reply all
Reply to author
Forward
0 new messages