Home » Android » This IP, site or mobile application is not authorized to use this API key – Android

This IP, site or mobile application is not authorized to use this API key – Android

Posted by: admin June 15, 2020 Leave a comment


I have a problem with connection with Google maps API V2 and Android. I’ ve enabled services:

  • Google Maps Android API v2
  • Places API

Also I’ve added sha1 fingerprint.

enter image description here

But I still get this message: This IP, site or mobile application is not authorized to use this API key

I’m calling service from Android. Do you know where might be the problem, cause I don’t know where to search.

How to&Answers:

You must be creating a browser key instead of an android key. I faced similar problem when I accidentely created an android key for Google Cloud Messaging instead of a server key. Please check which key is required for your purpose. For google maps v2 you need android key and for google places api you need a server key(searched google but not so sure on this one never used it). So basically you need two keys.

You need server key for places api.


Refer this tutorial.


Step 1– Go to code.google.com/apis/console/?noredirect

Step 2– Create a new project

Step 3– Go to services and choose Places API, turn it on. This will ask your organization name and url.Fill them and click Ok.

Step 4– Now go to API Access and there will be your API Key. You don’t have to click on Create new key. This will be your browser apps key which you can use in your Android Apps.

This solution worked for me perfectly.


If generating an Android App, the “Server” IP address could be any IP of any phone on any network. What do I write in the “Accept requests from these server IP addresses” box in order to have any IP address accepted?

Edit – Apologies. Apparently just leave it blank…


I just had this issue the other day, it is not actually an issue with this library.

First, make sure you’re using a server API key, not an Android/iOS key (if you’re doing mobile development). See this stackoverflow post: Google Places API request denied for Android autocomplete, even with the right api key . The TL;DR version of that link is that Google Places API doesn’t support the Android/iOS key option, only the server option.

Second, and this goes without saying, make sure you’re passing the key to the GooglePlaces instance.

Lastly, if you’re restricting use of the API key by IP make sure your request is coming from an allowed address.


You don’t need to create a key for using Google place API, instead just use “Key for browser apps (with referers)“. But if you want to use Google Map API, you need to generate a Android Key, and you could find instruction here :https://developers.google.com/maps/documentation/android/start.

Good luck.


I got this problem too. but I SOLVED this issue only using something tricky. Go to your google console and create new key which is browser key, then let the column empty and save. you can use the key that has been created in you mobile apps now.
GOOD LUCK! *Unfortunately I can’t post an image to this answer


Change your API key, you may use Android key in the URL. For to specify Key in the URL you need to get WEBSERVICE key.