Reputation:
Hello I am using GOOGLE maps API for android, and using my API key I am able to draw map.
Also added zoom in zoom out function. But when I try to fetch data from google API it gives me REQUEST_DENIED error message.
Here is my query string
https://maps.googleapis.com/maps/api/place/search/json?location=43.666,93.166&radius=5000&sensor=false&types=establishment&name=hotel&key={myKey}
I have tried many links to generate key
Also tried this link.
Help needed stuck in this problem for the last two days.
Upvotes: 1
Views: 600
Reputation: 731
If your keyApi is a android key won't work because you need a browser api (leave in black for all access allowed). From this link
"Accessing Google places API involves a http/https request from the browser. The application key you created wouldn't work for the Google places as it needs a browser key. You need to create a new browser key on the Google API console clicking the "Create new Browser Key"
Also leave the Accept requests from these HTTP referers (web sites): blank so that it allows access to all referrers and include the key generated in your query URL."
Upvotes: 1