REQUEST_DENIED when using the Google Places API

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

    NOTE: - I had implemented it in Android APP.

    I was facing the same problem with this API..

    Most of the solutions/ suggestions available on net are regarding the wrong key.

    But how to get the appropriate key? very little help is there regarding this.

    The sole reason behind it in my case was wrong KEY.

    I was using my Android Key (The one we use for google Maps) to access google places, that's why it was giving me ACCESS DENIED response.

    After Struggling for some hours I noticed in Google API Documentation somewhere there was a screenshot how to create KEY

    in that I noticed they key they were using was in "Key for browser apps (with referers)"

    whereas the one I was using was in "Key for Android apps (with certificates)"

    .....

    and to get the respective key We need to create a Browser Key.

    They key I was using initially was

    enter image description here

    The required key is enter image description here

    to get the required key :- just click on "Browser Key" and click again the input it askes for regarding some url is not a mandatory field

    enter image description here

    For further detail how to use it in ANDROID refer this link

    Don't forget to Turn On on the Services "Places API" from API Console

提交回复
热议问题