How to create and use Google Maps Platform API key for Website Builder
- cPanel Software Management
- 2,603 views
- Aelswith E.

Creating and configuring the Google Maps Platform API key
Pre-requisites
Enabling the set of APIse
Generating the API key
Restricting the API key (Optional)
Adding the API key to Website Builder
Creating and configuring the Google Maps Platform API key
Before you start using the Maps JavaScript API, you will need the following:
- Google Maps Platform billing account
- Google Maps Platform project
If you havenâ$™t configured Google Maps Platform yet, feel free to refer to the first steps of the Quickstart guide in order to set up the project and assign a billing account to it.
NOTE: You will still be able to create the API key without the billing account being assigned to the project, but this key will not allow you to embed Google Maps on your website; the error message shown is â$œYou must enable Billing on the Google Cloud Projectâ$ in the Browser Console. Thatâ$™s why itâ$™s better to take care of it beforehand.
In our example, we will use the Google Cloud Platform project My website project with the billing account already attached to it.

Before generating the key itself, we will make sure that the required set of APIs is enabled for My website project. The following APIs should be enabled in the case of the Maps module of the Website Builder:
NOTE: Your script or website module may require other APIs to be enabled. We suggest double-checking this with the official documentation of the corresponding module.
After enabling the required set of APIs for the project, the list of Google Maps APIs will look similar to this:

Once the required set of APIs is enabled, youâ$™re ready to generate the key. To get an API key:
1. Make sure that correct project is selected (in our case, My website project).
2. Proceed to APIs & Services >> the Credentials menu:



Restricting the API key (Optional)
This feature provides additional security and makes sure that only authorized requests are made with your API key. There are two restrictions:
1. Proceed to the Edit menu within the API key list:

NOTE: Make sure to change the domain.tld to the domain name of your website:


Adding the API key to Website Builder
Having an active API key will allow using the Google Maps Platform services within Website Builder.
1. Navigate to the page of your website which contains the map object and proceed to the Properties option:


