REQUEST_DENIED when using the Google Places API

前端 未结 12 1334
庸人自扰
庸人自扰 2020-12-04 01:56

I\'m trying to make a request to the Google Places API, using the following url: https://maps.googleapis.com/maps/api/place/search/xml?location=37.77264,-122.409915&radi

相关标签:
12条回答
  • 2020-12-04 02:34

    In my case, the problem was I tried to use the API key for Android (which seems fairly logical) but then I tried to change it for the browser's API key and it finally works right now. Why? Don't ask me. :)

    Hope that helped.

    0 讨论(0)
  • 2020-12-04 02:35

    Your key looks to be invalid, as mentioned by @Bryan Weaver in the comments. Substituting my own key in the request returns ZERO_RESULTS instead.

    BTW, you should also check out the list of supported types - educational%20services isn't one of them. That's not what's giving you the REQUEST_DENIED, but it's worth fixing anyway. If you ever want to specify multiple types, separate them with a pipe (|).

    0 讨论(0)
  • 2020-12-04 02:36

    I was having the same issue, kept getting request denied.

    I double checked to ensure my API key is correct, what I didnt realise was that I needed to create a New Server Key from the API Console. Now I get ZERO results, instead of the denied message.

    0 讨论(0)
  • 2020-12-04 02:41

    IMPORTANT: Go to the api console here, then to SERVICES and check if your 'Places API' is turned ON

    0 讨论(0)
  • 2020-12-04 02:42

    Great to see these many solutions. let me add another to the list. You can also try changing the Port address to 443 to get response from Places API

    0 讨论(0)
  • 2020-12-04 02:42

    Go to the api console here, then to SERVICES. Click Active services tab and verify 'Places API' is turned ON. Click on the ? "try" link next to it. It should create a proper URL with your key which should work. Compare the link that you are trying against this URL for differences.

    0 讨论(0)
提交回复
热议问题