【发布时间】:2015-05-05 04:55:35
【问题描述】:
我已在我的 android 应用程序中集成了 Google Places API。 我已经阅读了api文档See Here。
我已经为 android 激活了 Google Places Api 并生成了浏览器密钥 当我调用 api 时得到错误响应 -
{"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",
"html_attributions" : [],
"results" : [],
"status" : "REQUEST_DENIED"
}
我也尝试创建 android 密钥并返回 -
{
"error_message" : "This IP, site or mobile application is not authorized to use this API key.",
"html_attributions" : [],
"results" : [],
"status" : "REQUEST_DENIED"
}
我没有发现我的代码有什么问题。
感谢任何帮助。提前致谢。
检查 API 控制台 -
【问题讨论】:
-
能给个你用过的网址吗?
-
@Sandeep Singh 检查这个 -maps.googleapis.com/maps/api/place/textsearch/…
-
KISS 使用正确的 API 密钥(浏览器密钥)
-
也尝试使用浏览器密钥,检查我的问题
-
经过大量搜索后,通过从控制台激活“Google Places API Web Service”api 找到了解决方案。我不确定这是否正确,因为它是付费 api,我正在使用它在 android 上,它是一个 web api。