πΊοΈGoogle API
How to get Google Maps, Places and Geo location API keys.
Last updated
How to get Google Maps, Places and Geo location API keys.
Last updated
To utilize the Maps JavaScript, Places API, and Geolocation API, you'll need an API key. This key serves as a unique identifier, authenticating requests linked to your project for usage and billing tracking.
To obtain an API key:
Visit the Google API Console.
Click the project drop-down and either select an existing project or create a new one where you intend to add the API key.
Select the menu button and then choose Library.
Locate the Maps JavaScript API and activate it.
Return to the Library menu, locate the Places API, and enable it.
Return to the Library menu, locate the Geocoding API, and enable it.
Select the menu button, then go to Credentials, and click on Create credentials > API key.
The API key created dialog displays your newly created API key.
Your new API key will be listed on the Credentials page under API keys. (Remember to restrict the API key before using it in production environment.)
Select RESTRICT KEY.
An application restriction manages which websites, IP addresses, or applications can utilize your API key. You can set one application restriction per key.
Select HTTP referrers (web sites)
Click on ADD AN ITEM and input your domain. Your domain should follow this format: https://yourdomain.com/*
and yourdomain.com/*
Select Restrict key.
In the Select APIs dropdown menu, pick the Maps JavaScript API, Places API, and Geocoding API.
Now your API Key is ready for use.
Copy the API Key and paste it in your .env
file.
IMPORTANT Please ensure that everything is functioning correctly, including displaying maps and adding new client addresses on the order checkout page.
Additionally, you must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable
Learn more at https://developers.google.com/maps/gmp-get-started
Change Application Restrictions
If your server/domain configuration doesn't accept HTTP referrer restrictions, try changing the application restrictions back to None.
Enable Billing on your project
Occasionally, after adding the key, these features may cease to function. In such cases, it might be necessary to enable billing, depending on the Google account associated with the created project.
Find more information here: Billing or Getting started with Google Maps Platform
If you encounter ongoing issues with this configuration, please submit a ticket on our website.
Notice This type of support is not included in the standard package and may incur an additional fee. You can check and avail of this extra service on our official website natadtech.com under the services page.