How to get Google Maps, Places and Geo location API keys
To get an API key:
2. Click the project drop-down and select or create the project for which you want to add an API key.
3. Click the menu button and select Library.
5. Go back to the Library menu, find Places API and enable it.
6. Go back to the Library menu, find Geocoding API and enable it.
7. Click the menu button and select Credentials and click Create credentials > API key.
The API key created dialog displays your newly created API key.
The new API key is listed on the Credentials page under API keys. (Remember to restrict the API key before using it in production.)
7. Click on RESTRICT KEY.
An application restriction controls which websites, IP addresses, or applications can use your API key. You can set one application restriction per key.
- Select HTTP referrers (web sites)
- Click on ADD AN ITEM and add your domain. Your domain should look like this:
- Select Restrict key.
Now your API Key is ready for use.
8. Copy the API Key and paste in your
GOOGLE_MAPS_API_KEY="" //API KEY
IMPORTANT: Please make sure that everything is working okay (showing maps and adding new client address in order checkout page).
You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable
1. Change application restrictions Depending on your server/domain configuration the script maybe won't accept the HTTP referrers restrictions so try with changing the application restrictions back to None
2. Enable Billing on your project.
Sometimes after adding the key these features maybe won't work again. Then depending on the google account associated with the project created and maybe you will need to enable Billing.
If you have still problems with this configuration write us on our support chat for help/assistance.
Click the project drop-down and select your project.
From the left menu select IAM & Admin.
Now click on the Add button.
In the end click Save.