Home > Net >  Google Place Api eroor - The provided API key is invalid
Google Place Api eroor - The provided API key is invalid

Time:12-30

I want to find nearby restaurant i make request like i mention below

It says The provided API key is invalid but I enable api key from google console

Here is my request:-

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=21.17,72.31&radius=1000&type=restaurant&key=///My api key

Here is response:-

{
    "error_message": "The provided API key is invalid.",
    "html_attributions": [],
    "results": [],
    "status": "REQUEST_DENIED"
}

CodePudding user response:

add location like this:- 21.170240,72.831062 use , instead of ,

try calling request like this:-

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=21.170240,72.831062&radius=1000&type=restaurant&key=/// api key
  • Related