【问题标题】:iOS Google Places API: "This IP, site or mobile application is not authorized to use this API key"iOS Google Places API:“此 IP、站点或移动应用程序无权使用此 API 密钥”
【发布时间】:2014-06-03 12:38:09
【问题描述】:

我正在 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 中测试并完美运行。

【问题讨论】:

  • 您是否尝试过在 iOS 应用程序中使用浏览器客户端密钥?据我所知,places API 不支持 iOS 密钥。
  • 我没有,但我会的。现在,如果部署在 App Store 上,他们会特别询问您的 iOS 应用程序包标识符或应用程序 ID。会尝试让您知道。
  • @JoelBell !!!你说对了。它正在工作。它用于我的测试目的,但最终我会与他们交谈以了解发生了什么,但客户端密钥有效!!!谢谢!
  • @jsicary,没问题!乐意效劳。我会把这个变成答案,这样我们就可以结束这个问题了。
  • #Following answer By @moe 运行良好,[Answer by "Moe" is working full] [1] [1]: stackoverflow.com/questions/14654758/…

标签: ios ios7 google-places-api google-places


【解决方案1】:

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

更多信息在这里:https://groups.google.com/forum/#!topic/google-places-api/Jlm15dG7eMA

来自 google api 控制台文档:https://developers.google.com/console/help/#generatingdevkeys

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-03-22
    • 1970-01-01
    • 2014-07-19
    • 2016-04-03
    • 1970-01-01
    • 1970-01-01
    • 2014-07-15
    • 1970-01-01
    相关资源
    最近更新 更多