How to create API keys for Android in google console?

M
Muthurengan 6 years ago - Created

This guide explains the steps to be followed to successfully enable the pre-defined API present inside Google's Cloud platform for it to be used in your application.

Log into your Google cloud console account 

On reaching the Google Cloud Platform's dashboard,  follow the steps described below to enable the required API's.

1. Creating a Project

Click “Select a project” in the top horizontal menu bar adjacent to google cloud platform.


Select “Create Project” in the right corner of the dialog box.


Enter the respective name of your project and click “Create”. 

Upon successful project creation, a notification can be seen in “Notifications” section. 

Click the created project from the notification. You'll be taken to the Project's dashboard.

Sender ID

Make sure to identify "Project Number" in the dashboard which is the sender ID.


2. Enabling the API's

Click “API’s & Services” available from the left vertical menu options.


On reaching the API dashboard, Click “ENABLE APIS AND SERVICES”.


We need to enable 2 API's.

3. Enabling Google Maps Android API

Click “Google Maps Android API” from the maps section. If you’re unable to find it, kindly look for it with the help of search function. 

Click “Enable” button found in the Google Maps Android API screen.


Upon enabling the API, you end up the project’s API dashboard just like you did a few steps back. We also need to create credentials which will act a single key to entirely use the google cloud services for this project.


4. Enabling Google Places API

We also need to need to enable the Google Places API for Android as well to auto-suggest the places when someone starts to type in the address. To do so,

Goto API Library Click “Google Places API for Android” from the Maps section.

Click “Enable” button found in the Google Place API for Android screen.


5. Creating API key

Click “Credentials” from the left vertical menu options in the API’s & SERVICES section. 

Click “Create Credentials” in the small API’s Credentials dialog box. 

Out of three options, Click the first “API key” option. 

The created API key will be shown in the small dialog box like in the image below.




You have successfully generated an API key and the Sender ID.


Was this article helpful?

2 out of 2 found this helpful

Articles in this section