Since June 2016, Using Google Maps (on public websites) requires an API key. Here we explain how to get one and set it in the right place at the WPL.
** NOTE: When you get your Google Maps API key, you can set your daily quota for queries in the Google API console. Google Maps web APIs 25,000 free requests per day, which means the service stays free during the day until you reach this number. Here is Google map platforms pricing table
>> Getting Started
Navigate to the Google Maps Platform and click on the Get Started button in the top right corner of the site.
. Enable Google Maps Platform
Select the Maps, Routes and Places check boxes and press continue.
. Select a Project
If this is your first time creating an API key, you will have to create a Project first.
- Give your Project a name.
- Click the next button at the bottom-right of the window.
. Set up your billing
Wait for the billing prompt and select Create Billing Account
Select Submit and enable billing.
Once your billing has been set up, you can move creating your API Key.
How to Create API Credentials
Click on the Credentials option on the API Manager menu in the right sidebar.
Click on the Create Credentials button on the Credentials window:
Generate your API Keys:
* Note: In using WPL Plugin you need to get two API Keys:
1- Server Side:
There isn't any setting for this API key. You need to generate an API key and put in Server side placeholder in WPL side here: WPL > Settings > Global > Google API key (Server Side):
2- Client side:
The client side API needs to get restricted for 2 options:
> Click on API Key on the next pop-up window.
- Copy the generated API key to your clipboard.
- Return to your WPL > Settings > Global > and paste the API Key into the box labeled “Google API key (Client Side)”
How to restrict the Client side API key:
After pasting the API Key your WordPress site and saving the settings, return to the Google API Manager. You will want to restrict access to your API Key to avoid having it “hijacked” and going over your quota. Click the Restrict key button on the API key created window as shown above.
Select HTTP referrers (web sites) and enter the following domains under Accept requests from these HTTP referrers (web sites) replacing yourdomain.com with your domain name. The domain name has to be exactly with the same format that you can see in the snapshot below:
In the API restrictions, please specify API restrictions:
Click the Save button to save your Key Restrictions.
Please watch this video to find How to get Google API