Google Places API Key for Android App
Solution 1
see this doc to know how to obtain google places API key
Check out this tutorial for integrating Google places
Solution 2
For working with places api generate browser key because for that android key does not work. Had same issue but this solved the problem
ihsan
I'm a programming enthusiast, with an eye for good programming skills, new technologies, interesting ideas, mobile application platforms and social applications.
Updated on June 24, 2022Comments
-
ihsan almost 2 years
I have created an
API Key
(for Android apps) for my Android Application. It was required by google maps API. But now the same key won't work for Google Places API.I also tried hitting the browser with the following URL:
I get:
{ "error_message" : "This IP, site or mobile application is not authorized to use this API key.", "html_attributions" : [], "status" : "REQUEST_DENIED" }
When I googled for an answer, I found this:
https://developers.google.com/places/training/autocomplete-android
What type of API key?
You'll need your own browser or server API key for the Google Places API before you can begin using the Place Autcomplete service. Note that an Android API key will not work for the Place Autocomplete service.
This got me confused as I do not have any URL for a web app, nor any server IP. Therefore I am confused on how to get either a
Browser key
or aServer key
Could anyone please help me in figuring out what sort of key is needed here? Also if I have to create a
Browser key
or aServer key
, how can I do so? -
Claies over 8 yearsThis question was asked over a year ago; While it may be a correct answer now, it is unlikely that the original poster is still encountering this issue.
-
Shvet Chakra over 8 yearsI posted this answer for the ones who are facing the problem or will have the same problem, as after looking on SO when i did not find the cause and resolved it later, i thought it might be helpful for someone else also.
-
Claies over 8 yearsI just wanted to make sure you were aware of the age of the question; Posting knowledge for others to reference is always a great thing as long as it's presented as such.