Ad

Places Api Stopped Working In Android

I integrated Places API in my android project and it was working fine from past few months but suddenly it is giving me the following exception :-

This IP, site or mobile application is not authorized to use this API key. Request received from IP address 175.176.186.118, with empty referer

Please help me know what is the issue and how can i solve it.

I am using my Api key for getting the places response. It was working with my API key. I read on stack overflow that you need server key for this but i am unable to find any option for creating a server key.

Any help will be apreciated, Thank you.

Ad

Answer

Check your API Restrictions for your specific project in the Google API console. You can find it by navigating to your project on the console. Select credentials in the left tab and then select the "API restrictions" tab next to "Application restrictions" near the bottom of the page. From their, click the "Select API" drop down box and select Places SDK for Android. Or you can delete all the api restrictions to have no restrictions. Also check your application restrictions to restrict it to android apps if you're not using servers to make the request. Here is a question I answered a few weeks ago on how to set that up.

Ad
source: stackoverflow.com
Ad