此IP,站点或移动应用程序无权使用此API密钥。如何解决ios应用程序的这个问题? [英] This IP, site or mobile application is not authorized to use this API key. How to fix this issue for an ios app?

查看:526
本文介绍了此IP,站点或移动应用程序无权使用此API密钥。如何解决ios应用程序的这个问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ios app中的增强现实技术。我发现从这个网站。当运行在我的设备应用程序,我在的NSLog控制台接收到的错误,

I'm working on Augmented reality in ios app. I found a nice tutorial and a sample project from this site. While running that app in my device, I received the error in NSLOG console,

Response: {
"error_message" = "This IP, site or mobile application is not authorized to use this API key.";
"html_attributions" =     (
);
results =     (
);
status = "REQUEST_DENIED";
}

我在 Google开发者网站并创建了Sever Key为不支持iOS密钥,Google地方Api。我也尝试使用浏览器密钥,它不起作用。

I'd created a new project in Google dev site and created Sever Key as iOS Key is not supported for Google places Api. I'd also tried with browser key, it didn't work.

我的请求网址如下所示,

My Request url is look like below,

<NSMutableURLRequest https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=12.974760,80.225061&radius=1000&key=AIzaXXXXXXXXXXXXXXXXXXXMQ&sensor=true>



解决方案在此处建议,但没有运气。任何建议将不胜感激。

Tried some solutions suggested here in SO, but no luck. Any suggestions will be appreciated.

推荐答案

问题在于生成浏览器密钥。在生成新的浏览器密钥时,我们不应该在网站标签中输入任何网站网址,而是直接点击生成按钮可以提供新的浏览器密钥。

The issue is with generating browser keys. while generating new browser key, we should not enter any website urls in the websites tab, instead of that directly clicking generate button could give a new browser key.

使用该密钥时,问题得到了固定。

While using that key, the issue got fixed.

这篇关于此IP,站点或移动应用程序无权使用此API密钥。如何解决ios应用程序的这个问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆