本文介绍了Google Places API请求被拒绝错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的android项目中将google palces api用于自动填充textview.我已启用api密钥.我正在使用服务器密钥,但是在通过浏览器调用服务时,总是出现此错误:
{"error_message":该API项目无权使用此API.请确保已在API控制台中激活了此API:了解更多:https://code.google.com/apis/console",预测":[],状态":"REQUEST_DENIED"}
和android调试器中的相同错误.
解决方案
如错误所述,您必须转到
希望可以提供帮助.
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.
解决方案
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 :
Hope that can help.
这篇关于Google Places API请求被拒绝错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!