Where to place API key for Google Geocoding API?

拈花ヽ惹草 提交于 2019-11-29 05:59:54

Looks like in version 3 you need to pass the ClientID in the URL and not a key as you do in the free version: https://developers.google.com/maps/articles/v2tov3#newkey

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

Not lucky enough to have a paid account so I cannot test - but I think that will get you on the correct path.

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

Client ID

You must include your client ID in all API requests. Your client ID identifies you as a Maps API for Business customer and enables support and purchased quota for your application. Requests made without a client ID are not eligible for Maps API for Business benefits.

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.

More information is available in the Authentication and Authorization chapter of this guide.

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

EDIT

For more information, including instructions on passing your client ID to the Earth API, v2 API, and the Maps API for Flash, please read Loading Client-side APIs.

If you have lost your client ID or cryptographic key, you can recover them by logging in to the support portal and clicking Maps: Add URLs from the links on the left of the page.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!