Skip to content

Adjusting Google API key restrictions ​

Adding HTTP referrer restrictions to your Google API key prevents unauthorised use of your key from other websites.

Adding restrictions in Google Cloud console ​

  1. Go to Google Cloud console > APIs & Services > Credentials.
  2. Click the Edit icon next to your API key.
  3. Under Application restrictions, select Websites.
  4. Click Add an item and add URL patterns for your store, for example:
    • https://yourstore.myshopify.com/*
    • https://www.yourcustomdomain.com/*
  5. Click Save.

Allow up to 5 minutes for restrictions to propagate before testing. If you've customized your store's proxy page URL in Shopify, make sure your restriction patterns still match it.