jsi*_*ary 12 ios google-places-api google-places ios7
我正在iOS 7应用上测试Google Places API.
当我向API发送请求时,我得到一个json结果,并显示以下错误消息:
This IP, site or mobile application is not authorized to use this API key.
为了构建请求,我转到Google API控制台并根据我的应用程序包生成了我的iOS API密钥.
我没有在应用上使用Google地图或其他任何内容,只是尝试向Places API发出请求.
有什么我想念的吗?
PS:我复制了我正在使用的URL,并将API密钥更改为浏览器客户端密钥,并在Chrome中进行了测试并且运行良好.
Joe*_*ell 25
您是否尝试过在iOS应用中使用浏览器客户端密钥?据我所知,places API不支持iOS密钥.
更多信息:https://groups.google.com/forum/#!topic/google- places-api/Jlm15dG7eMA
并从谷歌api控制台文档:https://developers.google.com/console/help/#generatingdevkeys