Google Map API Configuration
How to Get Google Maps API Key
Follow the steps below to create and configure Google Maps API keys as per your requirements:
1. Google Maps API Key (with HTTP Restriction)
- Go to the Google Cloud Console and log in with your account.
- Select an existing project or create a new one.
- Navigate to APIs & Services > Credentials.
- Click Create Credentials and select API Key.
- After generating the key, click on the newly created key and go to the Restrictions section.
- Choose HTTP referrers (websites) under Application Restrictions.
-
Add your allowed website URLs (e.g.,
https://yourdomain.com/*
). - Save the changes and copy the API key for use in your application.
2. Google Maps API Key (with IP Restriction)
- Follow the steps from 1.1 to 1.5.
- In the Application Restrictions section, choose IP addresses.
-
Add the allowed server IP addresses (e.g.,
192.168.1.1
,123.456.789.0
). - Save the changes and copy the API key.
3. Google Maps API Key (with No IP/HTTP Restriction)
- Follow the steps from 1.1 to 1.4.
- After generating the key, leave the Application Restrictions section as None.
- Save the changes and copy the API key.
Note: It is highly recommended to use HTTP or IP restrictions to secure your API keys from unauthorized usage.