How Do I - Create a Google API Key
Create Google Project
First, be sure that you have created a Google Project. You can follow Google’s instructions here.
Create API Key
The API key is a unique identifier that authenticates requests associated with your project for usage and billing purposes. You must have at least one API key associated with your project.
To create an API key:
Log into your Google account.
Go to the Google Maps Platform > Credentials page.
On the Credentials page, click Create credentials > API key.
The API key created dialog displays your newly created API key.Click Close.
The new API key is listed on the Credentials page under API keys.
(Remember to restrict the API key before using it in production.)
Restrict API Key
Restricting API keys adds security to your application by ensuring only authorized requests are made with your API key. We strongly recommend that you follow the instructions to set restrictions for your API keys. For more information, see API security best practices.
To restrict an API key:
Log into your Google account.
Go to the Google Maps Platform > Credentials page.
Select the API key that you want to set a restriction on. The API key property page appears.
Under Key restrictions, set the following restrictions:
Application restrictions:
Set to None, or choose one of the other options as desired.
API restrictions:
Click Restrict key.
Select the following from the Select APIs dropdown:
Places API
Maps Javascript API
If these are not listed, enable them.
To finalize your changes, click Save.
Make a copy of your API key and keep it safe.
Â