Google Places API - REQUEST_DENIED [英] Google Places API - REQUEST_DENIED
问题描述
a)传感器= true_or_false问题 -
b)关键是错误的问题(除非我的密钥有限制)
c)太多的请求(因为我只提出一个请求)
d)跨域(因为我从浏览器地址栏加载url )
我做了什么
{
pre>
html_attributions:[],
results:[],
status:REQUEST_DENIED
}
到目前为止,所有的输入都由于错误的键或传感器而失败= true_or_false
例如url这一个 Google Places API jQuery.ajax()请求失败工作网址
也会在粘贴到浏览器时发生错误。
我做了什么miss?
更新
所以我去了一些k EYS
对于浏览器应用程序(与参照网址)
API密钥密钥:
AIzaSyCStj9m5LNTu9mCf6cQGDVAFKZC7Y ?????
查阅者:
允许任何引用者
激活时间:2012年1月30日1:03 PM
激活者:me
并尝试试。仍然无法正常工作。
实际上,您使用的是 键(来自 Sign注册Google Maps API ,仅适用于JavaScript V2 API)。
请参阅获取API密钥,了解如何获得新的API密钥。
编辑:在出现此问题时,在Geocoding API上工作的有效API密钥在Places API上无效,但现在看起来工作正常。看起来像谷歌方面的一些问题。
What this is NOT
a) a "sensor=true_or_false" issue
b) a key is wrong issue (unless the key I got has limitations)
c) too many requests (since I only make one request)
d) cross domain (since I load the url from the browser location bar)What I did
Tried the example on that page in the location bar (I know about cross domain from script)
works fine
Read the documentation
Pasted their example exchanging their key for mine
returns
{ "html_attributions" : [], "results" : [], "status" : "REQUEST_DENIED" }
So far all entries failed due to wrong key or sensor=true_or_false
And for example the url in this one Google Places API jQuery.ajax() request fails with working URL
also gives me error when pasted into the browser.
What did I miss?
UPDATE
So I went to get some keys
Key for browser apps (with referers) API key: AIzaSyCStj9m5LNTu9mCf6cQGDVAFKZC7Y????? Referers: Any referer allowed Activated on: Jan 30, 2012 1:03 PM Activated by: me
and tried again. Still does not work.
解决方案This is actually (b): wrong key. Actually, you're using the wrong kind of key (from Sign Up for the Google Maps API which is only good for the JavaScript V2 API).
Please see Obtaining an API Key for how to get a new API key, of the new kind.
Edit: At the time this question arose, valid API keys that worked on Geocoding API did not work on Places API, but now seem to work fine. Looks like some issue on Google side.
这篇关于Google Places API - REQUEST_DENIED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!