为什么我没能访问谷歌的自动完成API,即使我提供了一个关键 [英] Why I failed to access google autocomplete API even though I have provided a Key
问题描述
我试图访问
<一个href=\"https://maps.googleapis.com/maps/api/place/autocomplete/xml?input=Amoeba&types=establishment&location=37.76999,-122.44696&radius=500&sensor=true&key=AIzaSyAqTo6fgd8zK8rVNxvSO8WsEkBxRxd3PIE\" rel=\"nofollow\">https://maps.googleapis.com/maps/api/place/autocomplete/xml?input=Amoeba&types=establishment&location=37.76999,-122.44696&radius=500&sensor=true&key=AIzaSyAqTo6fgd8zK8rVNxvSO8WsEkBxRxd3PIE
我被拒绝访问。
正如你所看到的,我已经提供了一些关键的API。也许我提供不同的密钥
As you can see, I have provided some key API. Maybe I supplied different key
这是问题所在。
我得到了我的钥匙
的https://$c$c.google.com/apis/控制台/#项目:299025262955:服务
我启用了所有这些服务
Ad Exchange买方API赠送额度:1,000个请求/天
Ad Exchange Buyer API Courtesy limit: 1,000 requests/day
Google Maps API v2 Courtesy limit: 25,000 requests/day • Pricing
Google Maps API v3 Courtesy limit: 25,000 requests/day • Pricing
Google Maps Coordinate API Courtesy limit: 1,000 requests/day
Google Play Android Developer API Courtesy limit: 15,000 requests/day
Google+ API Courtesy limit: 10,000 requests/day
Static Maps API Courtesy limit: 25,000 requests/day • Pricing
此外,我读的地方,谷歌地图API 3不使用钥匙在所有进一步增加混乱。
Moreover, I read somewhere that google map API 3 does not use key at all to further add confusion.
所以,我一直在使用什么API密钥呢?谷歌API密钥?谷歌地图API密钥?谷歌地图API第3版密钥?什么?
So, what API key I should have been using anyway? Google API Key? Google Map API Key? Google Map version 3 API key? What?
我直接访问它,所以没有引用。是这个问题?对引用的设置是:
I access it directly so there is no referrer. Is that the issue? The setting for referrer is:
查阅情况:结果
允许任何参照
Referers:
Any referer allowed
我不知道这是否包括空白引用。
I wonder if that includes blank referrer.
推荐答案
我发现了什么问题。谷歌自动完成是谷歌的地方,而不是谷歌地图的一部分。所以,我需要打开谷歌的地方特色。
I found out what the problem is. Google AutoComplete is part of google places instead of google map. So I need to turn on google places feature.
它仍然很烂,虽然,因为它并没有告诉我地点的经度和纬度发现的。
It still sucks though because it doesn't tell me the latitude and longitude of places found.
这篇关于为什么我没能访问谷歌的自动完成API,即使我提供了一个关键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!