Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

This IP, site or mobile application is not authorized to use this API key. How to fix this issue for an ios app?

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";
}

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.

like image 698
Nazik Avatar asked Aug 15 '14 05:08

Nazik


1 Answers

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.

enter image description here

While using that key, the issue got fixed.

like image 113
Nazik Avatar answered Nov 14 '22 23:11

Nazik