简体   繁体   English

Android REQUEST_DENIED Google Places API

[英]Android REQUEST_DENIED Google places API

I am working on Android Google maps application but the query string i am using to get results of places near by the user is not working. 我正在使用Android Google Maps应用程序,但是我用来获取用户附近地点的结果的查询字符串不起作用。

http://maps.googleapis.com/maps/api/place/search/json?location=123.666,33.166&radius=50000&sensor=false&types=establishment&name=hotel&key={myKey}

I am using this link to obtain a Maps API key . 我正在使用此链接来获取Maps API密钥

here is the response i am receiving. 这是我收到的回复。

      {
         "html_attributions" : [],
         "results" : [],
         "status" : "REQUEST_DENIED"
      }

Thanks 谢谢

You need to generate the Places API key via: https://code.google.com/apis/console/ 您需要通过以下网址生成Places API密钥: https : //code.google.com/apis/console/

More on this under: https://developers.google.com/places/documentation/#Authentication 有关更多信息,请访问: https : //developers.google.com/places/documentation/#Authentication

HTH 高温超导

I'm quite sure you are using a wrong/old key. 我很确定您使用的是错误/旧密钥。 Lokk at your link, it's over 3 years old. 查看您的链接,它已经存在3年了。 Better try this way to obtain a new key: Obtaining a Google Maps Android API Key . 最好尝试使用这种方法来获取新密钥: 获取Google Maps Android API密钥 This is the official site. 这是官方网站。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM