Google Places API - REQUEST_DENIED [英] Google Places API - REQUEST_DENIED

查看:91
本文介绍了Google Places API - REQUEST_DENIED的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



a)传感器= true_or_false问题 -
b)关键是错误的问题(除非我的密钥有限制)

c)太多的请求(因为我只提出一个请求)

d)跨域(因为我从浏览器地址栏加载url )



我做了什么


  1. 已注册 http://code.google.com/apis/maps/signup.html

  2. 试用了示例(我知道关于跨域从脚本开始)

    正常工作

    阅读文档

    p>
  3. 粘贴了他们的示例,交换了



    退货






  {
html_attributions:[],
results:[],
status:REQUEST_DENIED
}
pre>

到目前为止,所有的输入都由于错误的键或传感器而失败= 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

  1. Signed up http://code.google.com/apis/maps/signup.html

  2. Tried the example on that page in the location bar (I know about cross domain from script)

    works fine

  3. Read the documentation

  4. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆