6

When i access the API getting below error response

{
"error_message" : "API keys with referer restrictions cannot be used with this API.",
"results" : [],
"status" : "REQUEST_DENIED" 
}

I have verified all the setting based on google documentation.

Google console settings:

enter image description here

Captured from chrome Network tab:

enter image description here

Any help you can give will be greatly appreciated.

htshame
  • 6,599
  • 5
  • 36
  • 56
Ravindar Singh T
  • 71
  • 1
  • 1
  • 4

2 Answers2

3

Select a specific API Restriction to solve this problem. Using "Maps Javascript API" failed for my Geocoding requirement but the "Geocoding API" worked perfectly to remove the error you are noting.

API Selection

Burndog
  • 711
  • 2
  • 8
  • 21
2

Try using your server IP Address as Application restrictions. Should work then.

enter image description here

Oleksa O.
  • 827
  • 8
  • 16
  • 5
    Setting a server IP address restriction will not work if you use the AP from a web browser. – Boschman Apr 01 '21 at 09:59
  • I don't get why everyone is saying use IP address instead. It might work, but those of us using it in a browser cannot restrict to a specific IP or range of IP. – Hafiz Temuri Aug 18 '23 at 19:53