# How to request a Google Maps API Key

This key is required in order to be able to publish your Android app.&#x20;

1. Navigate to <https://console.cloud.google.com/> and login with the Google Play Developer account on which you're planning to publish your app. Read here [how to create a Google Developer account.](https://docs.appmachine.com/share-your-app/google-play/create-a-google-developer-account)
2. After logging in, navigate to <https://console.cloud.google.com/projectcreate> and **create a new project**. (If you're an experienced Cloud Console user you can also opt to use an existing project.)

   <figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80082658477/original/MpQm1Ui9Aul2oGDmSRb37qL64JDUlINYvg.png?1646233716" alt=""><figcaption></figcaption></figure>
3. After the project has been created, open the API Library page via **APIs & Services > Library**<br>

   <figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80082658684/original/w36QaKDZdXMLBEbp8GVcvDJhVu0hdJjs6g.png?1646233735" alt=""><figcaption></figcaption></figure>
4. Search for the **Maps SDK for Android API** and use the **Enable** button to enable it.

   <figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80082658869/original/__viwdkgmHy9pJi4GOo5KtaCnHLnxG1euw.png?1646233752" alt=""><figcaption></figcaption></figure>
5. When you've enabled the API, navigate to the **APIs & Services > Credentials** page to create your API key.

   <figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80082658938/original/a1IPIlHvpF1wHRQsIgJV7PApoSLEyX-uLg.png?1646233759" alt=""><figcaption></figcaption></figure>
6. On the credentials page, use the **Create Credentials** button at the top of the screen to create a new API key.

   <figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80082659000/original/T9fQjIn41_lSB5rc6F1JezXAqP7w7EHFmA.png?1646233768" alt=""><figcaption></figcaption></figure>
7. Use the **Edit API Key** link to restrict the key for use in your Android app only.<br>

   <figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80110950390/original/v0L-8aG4hsEkdm-y-xDVoSBc5ItqBU-NNg.png?1654612569" alt=""><figcaption></figcaption></figure>

### To enter the API key at AppMachine&#x20;

1. Open **AppMachine**
2. Open your app
3. Click on the **Publish** button in the top right corner
4. Click on **Edit Store Info** in the Google Play Store tile
5. Enter the key in the **Google Maps API Key** field<br>

   <figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80115763389/original/ydQW4K7P3Jo-tpCE81jX-99HEO4hXk4gEA.png?1655934333" alt=""><figcaption></figcaption></figure>

\
**HIGHLY RECOMMENDED : Optional steps to secure your API key to be only used in this app**\
All the next steps are optional if you want to restrict the API key for being reused by other developers in other apps:&#x20;

1. Publish your app to Google Play Store
2. Upload your app at Google Play\ <br>

   <figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80114619067/original/E--Sl1cu3JeszQItlJ0bXWmg3-T1aRrPlA.png?1655714765" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80114636253/original/cBLfc3Rx14lotZD8CYoCkPkpa_z8xRDoJQ.png?1655716184" alt=""><figcaption></figcaption></figure>
3. Copy **SHA1**
4. Go back to **Google Cloud**
5. Select the **Android apps** option from the Application restriction options, and use the **Add an item** button to add your app's technical specifications to this API key.\
   \
   \&#xNAN;***\* Note:** You can obtain your app's package name and SHA1 hash via <support@appmachine.com>.*<br>

   <figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80082659122/original/PzLktNPCNyOGkI3x6IPUgR0sPPQGaRh-ag.png?1646233780" alt=""><figcaption></figcaption></figure>
6. Enter your app's **package name** and **SHA1 hash**, and use the **Done** button to complete the process.\
   \
   \&#xNAN;***\* Note:** The package name and SHA1 hash below are examples. You can obtain your app's package name and SHA1 hash via <support@appmachine.com>.*\ <br>

   <figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80114636549/original/32qmKiYjiQ8csJjvl_ZkozKaxk9--9rfcA.png?1655716208" alt=""><figcaption></figcaption></figure>
7. Use the **Save** button at the bottom of the page to save the changes you've made to your API key.
8. On the credentials overview page, use the copy button to copy the newly created and **restricted API key**.<br>

   <figure><img src="https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80082659236/original/_vDKC6UsJEhJgLwvPHQyTKdVIFXmddhiUQ.png?1646233795" alt=""><figcaption></figcaption></figure>

   \
   \
   **Congratulations! You've just successfully created a Google Maps API key for your app.**
