Display your app's certificate information

The Maps API key is based on a short form of your application's digital certificate, known as its SHA-1 fingerprint. The fingerprint is a unique text string generated from the commonly-used SHA-1 hashing algorithm. Because the fingerprint is itself unique, Google Maps uses it as a way to identify your application.

To display the SHA-1 fingerprint for your certificate, first ensure that you are using the right certificate. You may have two certificates:

You can display a certificate's SHA-1 fingerprint using the keytool program with the -v parameter. For more information about Keytool, see the documentation at http://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html.

Expand the sections below for detailed instructions on how to display your debug or release certificates.

Create an API project in the Google APIs Console

Follow these steps to create or modify a project for your application in the Google APIs Console and register for the Maps API.

  1. In a browser, navigate to the Google APIs Console.
  2. You should see a list of APIs and services in the main window. If you don't, select Services from the left navigation bar.
  3. In the list of services displayed in the center of the page, scroll down until you see Google Maps Android API v2. To the right of the entry, click the switch indicator so that it is on.
  4. This displays the Google Maps Android API Terms of Service. If you agree to the terms of service, click the checkbox below the terms of service, then click Accept. This returns you to the list of APIs and services.

Obtain a Google Maps API key

If your application is registered with the Google Maps Android API v2 service, then you can request an API key. It's possible to register more than one key per project.

  1. Navigate to your project in the Google APIs Console.
  2. In the Services page, verify that the "Google Maps Android API v2" is enabled.
  3. In the left navigation bar, click API Access.
  4. In the resulting page, click Create New Android Key....
  5. In the resulting dialog, enter the SHA-1 fingerprint, then a semicolon, then your application's package name. For example:

    BB:0D:AC:74:D3:21:E1:43:67:71:9B:62:91:AF:A1:66:6E:44:5D:75;com.example.android.mapexample
    
  6. The Google APIs Console responds by displaying Key for Android apps (with certificates) followed by a forty-character API key, for example:

    AIzaSyBdVl-cTICSwYKrZ95SuvNw7dbMuDt1KG0