谷歌地图地理编码:我得到了一个新的 API 密钥,但它声称它无效
我有一个使用 Google 地图地理编码 API 的地理编码库(MarginalHacks.com 上的 makeKML.pm).它已停止工作,因为它使用的是 v2 请求,所以我已切换到 v3,但我被告知我的 API 密钥无效.所以我登录到他们灾难性的混乱云控制台,并最终弄清楚如何制作新的服务器 API 密钥.我再次尝试使用新密钥发出请求:
I have a geocode library (makeKML.pm at MarginalHacks.com) which uses the Google Maps geocode API. It has stopped working because it was using v2 requests, so I've switched to v3, and I'm told my API key is invalid. So I login to their disastrously confusing cloud console and finally figure out how to make a new server API key. Again I try a request with the new key:
https://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=659+Valencia+St%2C+San+Francisco+CA&key=<<<my new API key here>>>
我不断得到:
<?xml version="1.0" encoding="UTF-8"?>
<GeocodeResponse>
<status>REQUEST_DENIED</status>
<error_message>The provided API key is invalid.</error_message>
</GeocodeResponse>
对正在发生的事情有什么想法,或者我如何确保我使用的是正确类型的 API 密钥?我在云控制台中打开了 Google Maps Geocode API 并注册了一个新的网络应用程序,我可以在该应用程序中获取我正在使用的服务器密钥.
Any thoughts on what's going on, or how I can ensure that I'm using the right type of API key? I've turned on the Google Maps Geocode API in the cloud console and registered a new web app which is where I'm getting the server key I'm using.
您的查询有效 没有钥匙
没有Google 地图地理编码网络服务的关键参数;该文档确实指出:Maps API for Business 用户必须在其地理编码请求中包含有效的客户端和签名参数",但这是额外费用(与 Google 签订的合同),而不是密钥".
There is no key parameter to the Google Maps Geocoding Web Service; the documentation does state: "Maps API for Business users must include valid client and signature parameters with their Geocoding requests", but that is additional cost (a contract with Google), and not a "key".