This IP, site or mobile application is not authori

2019-04-08 09:47发布

问题:

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.

回答1:

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.



回答2:

Choose browser key only without any website name then it will work for android, I tried for both server key and android key but it is not working for me.