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?

Uprise10
  • 147
  • 1
  • 1
  • 7
  • possible duplicate of [Do Google API keys work with Google Maps web services, e.g. geocoding?](http://stackoverflow.com/questions/9949122/do-google-api-keys-work-with-google-maps-web-services-e-g-geocoding) – geocodezip Dec 10 '13 at 14:45

5 Answers5

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."

Shripad Bhat
  • 2,373
  • 2
  • 19
  • 21
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.

jlivni
  • 4,759
  • 1
  • 19
  • 30
  • 1
    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 https://developers.google.com/maps/documentation/geocoding/#api_key – John Fiala Apr 07 '14 at 22:47
  • 1
    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. – jlivni Apr 09 '14 at 18:22
  • 2
    "geolocation is not the same as geocoding". I was turning on the wrong service. Thanks – akki Dec 09 '14 at 19:17
11

Enable

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

hardramoliya
  • 163
  • 1
  • 2
  • 13
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/

ysekand
  • 31
  • 2
  • does that also mean the key parameter is completely useless now? since we're not using the Maps API for Business implementation. – Uprise10 Dec 10 '13 at 13:03
  • As of now, on Android I got this bug and simply removing the API key and parameter was enough. – tricknology Sep 04 '14 at 05:38
0

For me Services has started working after 7 minutes.

Ajay Takur
  • 6,079
  • 5
  • 39
  • 55