This article explains how to manually request a Google Maps API key for your AppMachine app. This key is required in order to be able to publish your Android app.
- 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.
- 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)
- After the project has been created, open the API Library page via 'APIs & Services > Library'
- Search for the 'Maps SDK for Android' API and use the Enable button to enable it.
- When you've enabled the API, navigate to the 'APIs & Services > Credentials' page to create your API key.
- On the credentials page, use the Create Credentials button at the top of the screen to create a new API key.
- Use the 'Edit API Key' link to restrict the key for use in your Android app only.
To enter the API key at AppMachine
- Open AppMachine
- Open your app
- Click on the Publish button in the top right corner
- Click on Edit Store info in the Google Play Store tile
- Enter the key in the Google maps field
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:
- Publish your app to Google Play Store
- Upload your app at google play
- Copy SHA1
- Go back to Google Cloud
- 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.
* Note: You can obtain your app's package name and SHA1 hash via email@example.com.
- Enter your app's package name and SHA1 hash, and use the Done button to complete the process.
* Note: The package name and SHA1 hash below are examples. You can obtain your app's package name and SHA1 hash via firstname.lastname@example.org.
- Use the Save button at the bottom of the page to save the changes you've made to your API key.
- On the credentials overview page, use the copy button to copy the newly created and restricted API key.
Congratulations! You've just successfully created a Google Maps API key for your app.