I am trying to call the Google places API in my android app, using the following : https://maps.googleapis.com/maps/api/place/textsearch/xml?query=restaurants+in+Sydney&sensor=true&key=AddYourOwnKeyHere

I have tried using a debug key, and have even tried generating a private key, but all I get is the REQUEST_DENIED response.

I have followed the steps mentioned for generating an Android API key, but still the error.

What am I missing? Is there a definitive guide I can use for using google places api in my android app?

Your suggestions would be highly appreciated.

有帮助吗?

解决方案

You are using Android key for google Place API.
Login on google console then create a Place API key, try again. enter image description here enter image description here

其他提示

  1. Delete old api project from api console.
  2. Create a new project.
  3. Start only the google places api service.
  4. Clicked the try it out link 5 .use the default key it had made.
  5. Copied the key from the url field and Use it in app.
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top