This document will set the google API key for the plugin. Please follow all steps.
1. Enable billing
To enable billing for your project:
- Go to the API Console.
- From the projects list, select a project or create a new one.
- Open the console left side menu and select Billing.
- Click Enable billing. (If billing is already enabled, then this option isn’t available.)
- If you don’t have a billing account, create one.
- Select your location, fill out the form, click Submit and enable billing.
2. Enable API’s
To enable an API for your project:
- Go to the API Console.
- From the projects list, select a project or create a new one.
- If the APIs & services page isn’t already open, open the console left side menu, select APIs & services, and select Library.
- Click the API you want to enable. If you need help finding the API, use the search field.
- Click ENABLE.
Please enable the following API:
3. Create a key for Server Application restrictions.
- Go to the Google Cloud Platform Console.
- On the left menu, click on Credentials.
- Click on the Create Credentials button at the top of the page and select API Key.
- The new pop-up window will show up with your new key. Click restrict key.
- On the key settings page, you can call the key as website key.
- On the Application restrictions section choose IP addresses (web servers, cron jobs, etc.).
- Accept requests from these server IP addresses section will show up, click Add an item.
- Write your server IP address and click done.
- On the API restrictions section, you can choose none or If you want to enable APIs, click Restrict key and select the following API:
Distance Matrix API - Click the Save button.
- Copy the key, go to the plugin settings, and set the key for Distance Matrix API. ( Application restrictions: IP addresses ) input.
You are Done!