Google Maps API
Last updated
Last updated
Go to the Google Cloud Console: .
Create a new project:
Click the Select a project dropdown at the top.
Click New Project.
Provide a Project Name, choose an organization (if applicable), and click Create.
Once the project is created, select it from the project dropdown.
Enable APIs:
In the Google Cloud Console, click the Navigation Menu (three horizontal lines in the top left).
Go to APIs & Services > Library.
Search for Maps SDK for Android (for Android apps) and Maps JavaScript API (for Web apps).
Click on each API and then click Enable to activate it for your project.
Create API key:
After enabling the APIs, go to APIs & Services > Credentials.
Click + Create Credentials > API Key.
Google will generate an API key for you.
Restrict API Key (Recommended):
After generating the key, click on the API key to edit.
Under API restrictions, select the Maps SDK for Android (for Android) or Maps JavaScript API (for Web).
Under Application restrictions, select the relevant option:
For Android: Select Android apps and provide the SHA-1 fingerprint and package name.
For Web: Select HTTP referrers (websites) and enter the domain(s) where the API key will be used.
Click Save.