Where can I place the API key for the Google Geocoding API?

We use the Google geocoding API to match addresses with latitude and longitude.

Here is an example URL for encoding (which json returns) -

http://maps.googleapis.com/maps/api/geocode/json?address=Dallas&sensor=false

Message: OVER_QUERY_LIMIT

Well, that makes sense because we exceed 2500 daily limits, so we add an API key like this -

http://maps.googleapis.com/maps/api/geocode/json?key=xxxxx&address=Dallas&sensor=false

Message: REQUEST_DENIED

I am wondering where / how to put the API key.

+8
google-maps google-maps-api-3 geocoding
source share
1 answer

It seems that in version 3 you need to pass the ClientID to the URL, and not key , as in the free version: https://developers.google.com/maps/articles/v2tov3#newkey

So your URL should look like this: http://maps.googleapis.com/maps/api/geocode/json?client=xxxxx&address=Dallas&sensor=false

Iโ€™m not lucky that I have a paid account, so I canโ€™t check, but I think this will lead you to the right path.

Relevant at this link: https://developers.google.com/maps/documentation/business/webservices/

Customer id

You must include your customer ID in all API requests. The customer ID identifies you as a client of the Maps API for Business and provides support and an acquired quota for your application. Requests made without a customer ID are not suitable for the benefits of the Maps API for Business.

If you are moving from free API services to the Maps API for To implement a business, you must remove the key parameter from your Requests. The Google Maps API Web Services will reject requests made using both the customer ID and the key.

Additional information is available in the "Authentication and Authorization" section of this guide.

If you have lost your customer ID, you can restore it by logging in to the support portal and clicking "Maps": add the URLs from the links on the left of the page.

EDIT

For more information, including instructions for passing your Earth API client ID, API v2, and map APIs for Flash, read Downloading client APIs .

If you have lost your customer ID or cryptographic key, you can restore them by going to the support portal and clicking on "Maps": add the URLs from the links on the left of the page.

+11
source share

All Articles