Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Place API - Always return this "status" : "REQUEST_DENIED"

I am currently working with Google Place API, I have a problem with it whenever I am going to access this link

https://maps.googleapis.com/maps/api/place/search/json?location=latitude,longitude&radius=1&sensor=false&key=apikey

with entering the information like latitude,longitude and API key and set sensor equal to false,but it always shows :

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

I already searched for that kind of error and I saw that some of the post suggests to check sensor value and check the API key. I already checked it and also checked the service is enabled for Google Maps API v3. But nothing works for me. I am new to this, I don't get what I am doing wrong, Please help.

like image 526
user2182010 Avatar asked Jun 20 '13 12:06

user2182010


1 Answers

You are using http(s) for calling Google API, is your html also hosted under http(s). If not try changing google url to http.

Otherwise every thing else kinda looks ok so that makes me think you might wanna check your api console again, go to SERVICES and check if your 'Places API' is turned ON.

You can also try changing the Port address to 443 to get response from Places API

like image 143
varun Avatar answered Sep 29 '22 19:09

varun