iOS Google Places API: “This IP, site or mobile application is not authorized to use this API key”

天涯浪子 提交于 2019-12-09 02:49:37

问题


I am testing the Google Places API on an iOS 7 app.

When I send a request to the API I get a json result with the following error message:

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

To build the request, I went to the Google API console and generated my iOS API Key based on my application bundle.

I'm not using Google Maps or anything else on the app, just trying to make a request to the Places API.

Is there anything I'm missing?

PS: I copied the URL I'm using and changed the API key to the browser client key and tested it in Chrome and worked perfectly.


回答1:


Have you tried using the browser client key inside the iOS app? From what I remember, the places API doesn't support iOS keys.

More info here: https://groups.google.com/forum/#!topic/google-places-api/Jlm15dG7eMA

And from the google api console docs: https://developers.google.com/console/help/#generatingdevkeys



来源:https://stackoverflow.com/questions/23163663/ios-google-places-api-this-ip-site-or-mobile-application-is-not-authorized-to

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