You are using Android key for google Place API.
Login on google console then create a Place API key, try again.
Google Places API "request denied" error [closed]
-
29-05-2022 - |
Question
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.
Solution
OTHER TIPS
- Delete old api project from api console.
- Create a new project.
- Start only the google places api service.
- Clicked the try it out link 5 .use the default key it had made.
- Copied the key from the url field and Use it in app.
In google console, in services tab, have you switched on google maps? Reference: https://developers.google.com/maps/documentation/javascript/tutorial#api_key https://developers.google.com/places/documentation/