Secure Your Google Maps API Key
Google offers a robust and secure method for using your API key, making it easy to manage while ensuring it is only utilized on your designated websites. This approach enhances both security and ease of use, providing peace of mind as you integrate your API.
If you have already created the API key, follow the below steps to apply the restrictions for utilising it only on specified websites :
Step 1: Access API Credentials
Open Google Cloud Console.
Navigate to APIs & Services → Credentials.
Locate your API key and click on it to edit the restrictions.

Step 2: Set Application Restrictions
In the Application restrictions section, select Websites.
This limits the API key usage to specific domains only.

Step 3: Add Website Restrictions
In the Website restrictions field, enter your store domains without https://, as shown below.

Example entries:
Required domains for Shopify and the app:
Step 4: Apply API Restrictions
Scroll to the API restrictions section.
Select the Restrict key.
Choose the required API services from the list (based on your integration needs).

Step 5: Save Your Changes
Click Save at the bottom of the page.
Your API key restrictions will now be applied and enforced.

Last updated