0

I just added Google Places API Web Service to my project, added an API key (unrestricted, for testing) and I am copy pasting requests from the docs to try things out, for example:

curl https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&key=my_new_key

I only get Request Denied ("This service requires an API key."), but in the API console I do not see any errors. The key is really in the curl command line in my sample, the API is enabled in the console, the key is valid and not restricted. I cannot find a reason why this should not work?

MisterBic
  • 307
  • 5
  • 18
jum
  • 247
  • 1
  • 9

1 Answers1

0

Here are few things you could try...

  • API key is for the application but you should authorize that application in google before using it.
  • Check your API key again and see if theres any encoding required before using it.
  • Enable API from your google account.
  • See if theres any restriction on your API key for example :
    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).

Hope this helps..

Try this link.... very helpful
REQUEST DENIED with Google Places API KEY for Server Web used in an Android application

RupeshA85
  • 1
  • 1
  • If I make an unrestricted key (it shows the yellow exclamation point to warn that it is unrestricted), there should be no other authorization necessary, or do I oversee here anything? – jum Jun 29 '17 at 14:59
  • Also the API is enabled in the console. – jum Jun 29 '17 at 15:00