0

I getting this message error from google maps while requesting url for source and destination point. Does any one know about it. Please share your experience.

{ "error_message" : "This IP, site or mobile application is not authorized to use this API key. Request received from IP address 103.24.99.82, with empty referer",

"routes" : [], "status" : "REQUEST_DENIED"

}

url: https://maps.googleapis.com/maps/api/directions/json?origin=24.878353,67.064308&destination=24.909353,67.085304&sensor=false&avoid=highways&mode=driving&key={key_value_here}

RajeshKumar R
  • 15,445
  • 2
  • 38
  • 70
MRizwan33
  • 2,723
  • 6
  • 31
  • 42

2 Answers2

3

It may be the reason of IP address got restricted by the Google.

You can follow below steps to rectify it:

  1. Go to the Google API Console.
  2. Select the project that was created for you when you signed up.
  3. From the list of API keys, select the key you're using.
  4. In the Restrictions section, select IP addresses (web servers, cron jobs, etc.).
  5. Under Accept requests from these server IP addresses, enter the IP addresses from which your key is to be accepted, one per line. You may also enter a subnet using CIDR notation (e.g. 192.168.0.0/22).
Peter Sobhi
  • 2,542
  • 2
  • 22
  • 28
0

You must call google directions api from a project with same bundle id associated with the key you created

Shehata Gamal
  • 98,760
  • 8
  • 65
  • 87