Google places api request denied error

半城伤御伤魂 提交于 2019-12-11 18:32:51

问题


I am using google palces api for autocomplete textview in my android project. I have enabled the api key. I am using a server key but all the time I have this error when I call the service through a browser :

{
   "error_message" : "This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console: Learn more: https://code.google.com/apis/console",
   "predictions" : [],
   "status" : "REQUEST_DENIED"
}

And same error in android debugger.


回答1:


As mentioned in the error, you have to go to the Google Developers Console, then open APIs & auth -> APIs and enable the Google Places API Web Service which include the autocomplete feature :

Find detailed information about places across a wide range of categories. Backed by the same database used by Google Maps and Google+, the Google Places API Web Service features about 100 million businesses and points of interest that are updated frequently through owner-verified listings and user-moderated contributions. Key features include autocomplete, search, place picker, photos and add place.

Hope that can help.



来源:https://stackoverflow.com/questions/32652330/google-places-api-request-denied-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!