Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleWhat is an API key?

An API key is a unique identifier that authenticates requests associated with your project for usage and billing purposes. You must have at least one API key associated with your project.

Step-by-step

...

guides

Enabling the products in google cloud 

  1. Go to: https://console.cloud.google.com/
  2. Head to Enable APIs & Services > Library > Search for "Places API" > Click into product > Enable
    Image Added
  3. Do the same again for "Place API (new)" & then again for "Maps Javascript API"
    Image Added


Creating API Keys

  1. Go to: https://console.cloud.google.com/
  2. On the Credentials page, click Create credentials > API key.
    The API key created dialog displays your newly created API key.
  3. Click Close.
    The new API key is listed on the Credentials page under API keys.
    (Remember to restrict the API key before using it in production.)


Once your API is created you will need to
restrict the API to your website URL and any associated Stage sites so it cannot be used for unauthorized use. Restricting API Keys adds security to your application by ensuring only authorized requests are made with your API Key. We strongly recommend that you follow the instructions to set restrictions for your API Keys. For more information, see API Key best practices.

Restricting API keys

  1. Go to the APIs & Services > Credentials
  2. Select the API key that you want to set a restriction on. The API key property page appears.
    Image Removed
    Image Removed
  3. Under Key restrictions, set the following restrictions:
    1. Application restrictions: Make sure to add an asterix after the URL so any associated URLs are also included.
      Image Removed
    2. API restrictions:
      1. Click Restrict key.
      2. Select Places API from Select APIs dropdown. If the Places API is not listed, you need to enable it.
        Image Removed
      3. Select Maps Javascript API from Select APIs dropdown. If the Places API is not listed, you need to enable it.
        Image Removed
    3. To finalize your changes, click Save


Adding Keys to CMS

  1. Go to SettingsFeature ManagementDelivery Address Lookup Provider Feature Settings → Google
  2. Ensure "Google Address Lookup Service Uri" is set to
    `https://maps.googleapis.com/maps/api/js?key=`
  3. Enter the Google API Key
    Image Added


Info
titleWhat if it still doesn't work?

If the API is still not providing the right access – please add the Commerce Vision helpdesk gmail account and provide access so we can configure as required.

CV support gmail: commercevision.helpdesk2@gmail.com

How to add CV support: https://support.google.com/googleapi/answer/6158846?hl=en#zippy=%2Cadd-project-members

Adding Keys to CMS

...


Restricting API keys

  1. Go to the APIs & Services > Credentials
  2. Select the API key that you want to set a restriction on. The API key property page appears.
    Image Added
    Image Added
  3. Under Key restrictions, set the following restrictions:
    1. Set "Application restriction" to "HTTP referrers"
    2. Click "Add an item" 
    3. Set referrer to *.yoursite.com/*
    4. To finalise your changes, click Save

Multiexcerpt
MultiExcerptNameCan't find this feature management page in CMS?
If you're using a version before 4.40, then head to SettingSettings  Google Merchant Settings to fill in the Google lookup details

...