google maps - This IP, site or mobile application is not authorized to use this API key with IP authorized -


i'm using google places api requires give list of ips allowed use service. api works great on local machine give

this ip, site or mobile application not authorized use api key

when use production server. i've added required ips. other ideas might issue or how debug it?

i had same issue , found this.

on url, requires server key in end , not api key app.

so basically, add server key in end of url this:

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=yourlatitude,yourlongitude&radius=5000&sensor=true&key=serverkey

now, obtain server key, follow these steps:

1) go developer console https://code.google.com/apis/console/

2) in credentials, under public api access , create new key

3) select server key option.

4) enter ip address on field , if have more ip addresses, can add on every single line.note: enter ip address when want use testing purpose. else leave ip address section blank.

5) once done, click create , new server key generated , can add server key url.

last thing that, instead of putting sensor=true in middle of url, can add in end this:

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=yourlatitude,yourlongitude&radius=5000&key=serverkey&sensor=true

this solve issue , remember use server key places api.

hope answer , other viewers. luck .. :)


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -