REQUEST_DENIED when using the Google Places API

前端 未结 12 1368
庸人自扰
庸人自扰 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:28

    I've had a similar issue, fixed it and discovered a few things that may be useful in troubleshooting this

    • using http instead of https will result in REQUEST_DENIED
    • omitting &userIp=x.x.x.x will result in REQUEST_DENIED
    • a server key needs to be generated and used in case the request is from a php script even if ONLY consumed via browser by users or it will result in REQUEST_DENIED
    • a few minutes are necessary before testing if the list of IPs allowed has been changed

    Hope it helps some of you guys

提交回复
热议问题