Android - 403 when requesting map image with valid API key

I'm trying to load a static map API image, but it keeps 403-ing, which seems to be because of an invalid API key (based on the docs

I've verified in the console that the API key is valid and non-expired. The url,-122.359&zoom=12&size=411x231&maptype=roadmap&mobile=true&scale=2&key=xxxxx loads fine in the browser, so I take that to mean that the API key is valid.

The API key lives in the AndroidManifest.xml file


Anyone else experience this?

2 answers

  • answered 2018-11-16 22:01 Eric C

    Can you post code for how you are accessing and building the url to be sent?

    Also if you are on a premium plan, then you will need to add a signature metadata field as described here:

  • answered 2018-11-16 22:11 Lady_ari

    So, I did a bit of digging, and it seems like Google made a change in June of this year where the url now requires the key to be sent. They no longer support keyless usage. This is terrible, since it breaks older app versions that used the old structure.