iOS Google Places API:“此IP,网站或移动应用程序未被授权使用此API密钥”

我正在iOS 7应用上testingGoogle Places API。

当我向API发送一个请求时,我得到一个json结果,并显示以下错误消息:

This IP, site or mobile application is not authorized to use this API key.

为了构build请求,我去了Google API控制台,并根据我的应用程序包生成了我的iOS API密钥。

我没有使用Google地图或应用中的其他任何内容,只是试图向Places API发送请求。

有什么我失踪?

PS:我复制了我正在使用的URL,并将API密钥更改为浏览器客户端密钥,并在Chrome中进行了testing,并且工作完美。

您是否尝试过在iOS应用程序中使用浏览器客户端密钥? 从我记得,地方API不支持iOS密钥。

更多信息请访问: https : //groups.google.com/forum/#!topic/google- places-api/ Jlm15dG7eMA

从谷歌api控制台文档: https : //developers.google.com/console/help/#generatingdevkeys