Maps API keys for geocoding not working anymore?
Asked Answered
R

5

14

It seems that the generated keys in the Google API's console are not working anymore. With different keys (tried it with both server and browser key, however the server key is what I need), generated from different accounts I get constantly the following errors:

Error when using server key:

{
   "error_message" : "This site or IP is not authorized to use this API key.",
   "results" : [],
   "status" : "REQUEST_DENIED"
}

Error when using browser key:

{
   "error_message" : "The provided API key is expired.",
   "results" : [],
   "status" : "REQUEST_DENIED"
}

And these are the enabled services on this account/project: http://upload.uprise.nl/et2j

This is the URL I'm trying: https://maps.googleapis.com/maps/api/geocode/json?address=900+Maple+Avenue%2C+L7S+2J8+Burlington+%28Ontario%29%2C+Canada&oe=utf8&sensor=false&key=mykey

Without the key it is working until I reach my daily limit (which causes the OVER_QUERY_LIMIT status).

Are more people experiencing this?

Ramayana answered 10/12, 2013 at 9:54 Comment(1)
possible duplicate of Do Google API keys work with Google Maps web services, e.g. geocoding?Elenor
S
15

Geocoding is not one of the services available through the developer console at this time, which is why the key does not work (note that geolocation is not the same as geocoding).

Currently you'd need to use client side geocoding (for example in the JS Maps API) -- or purchase more server side geocoding with a maps for business license in order to increase this quota.

The fact it says the key is expired is misleading, and I'll file a bug for that.

EDIT/UPDATE: The geocoding service is now available through the developer console.

Selfdetermination answered 10/12, 2013 at 21:6 Comment(3)
Seems like that bug is still open - I just got that error as well. And the docs do say you need a server side key for that at developers.google.com/maps/documentation/geocoding/#api_keyMcmillan
Good call - my previous answer is outdated (I will edit now): Since I wrote that, the geocoding web service has become available via the developer console, and you can simply request a key there and use it. If you are having one of the errors noted above it is probably because you have not enabled the service in the console for the project your key is associated with. If you think this is incorrect, maybe start a new question here with details.Selfdetermination
"geolocation is not the same as geocoding". I was turning on the wrong service. ThanksOmentum
P
22

I have faced same issue... But finally got resolved. Google place services will take 10 minutes to make the services available for new API KEY created. Services will stat working after 10 minutes, till then we get error as "The provided API key is expired."

Pampuch answered 13/12, 2014 at 20:17 Comment(3)
I can't believe they don't show a warning for this... Thank youHamlani
I have the same issue and then just noticed that it says "Note: It may take up to 5 minutes for settings to take effect" when generating the key.Fable
It is actually the opposite of expired ("too new"). They need to work out their error messages.Scampi
S
15

Geocoding is not one of the services available through the developer console at this time, which is why the key does not work (note that geolocation is not the same as geocoding).

Currently you'd need to use client side geocoding (for example in the JS Maps API) -- or purchase more server side geocoding with a maps for business license in order to increase this quota.

The fact it says the key is expired is misleading, and I'll file a bug for that.

EDIT/UPDATE: The geocoding service is now available through the developer console.

Selfdetermination answered 10/12, 2013 at 21:6 Comment(3)
Seems like that bug is still open - I just got that error as well. And the docs do say you need a server side key for that at developers.google.com/maps/documentation/geocoding/#api_keyMcmillan
Good call - my previous answer is outdated (I will edit now): Since I wrote that, the geocoding web service has become available via the developer console, and you can simply request a key there and use it. If you are having one of the errors noted above it is probably because you have not enabled the service in the console for the project your key is associated with. If you think this is incorrect, maybe start a new question here with details.Selfdetermination
"geolocation is not the same as geocoding". I was turning on the wrong service. ThanksOmentum
M
11

Enable

Google Places API Web Service from google console. It's work for me.

Mchale answered 18/5, 2015 at 6:59 Comment(4)
Worked for me too but i do not what is the logic behind it.Sigman
Because place search through this API That's whyMchale
and what is the purpose of "Google place for android API" ? One more thing google place worked only 2-3 times and now i am getting host java.net.UnknownHostException: Unable to resolve host "maps.googleapis.com": No address associated with hostnameSigman
Now i am again receiving data. wired.Sigman
O
3

If you're switching from the free API services to a Maps API for Business implementation, you must remove the key parameter from your requests. Google Maps API web services will deny requests made with both a client ID and a key.

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

Outgrowth answered 10/12, 2013 at 12:55 Comment(2)
does that also mean the key parameter is completely useless now? since we're not using the Maps API for Business implementation.Ramayana
As of now, on Android I got this bug and simply removing the API key and parameter was enough.Equation
A
0

For me Services has started working after 7 minutes.

Augite answered 28/1, 2015 at 19:33 Comment(1)
2 min for me... got me worryin for a wee bit thereStamey

© 2022 - 2024 — McMap. All rights reserved.