Skip to content

Google API Settings for Dealer Locator

This document provides instructions on how to configure Google API settings for the Dealer Locator feature in your application.

Prerequisites

  • A Google Cloud account.
  • Access to the Google Cloud Console.
  • Billing enabled on your Google Cloud project.
  • The Dealer Locator feature enabled in your application.
  • An API key with the necessary permissions.
  • The domain where your application is hosted.

Steps to Configure Google API Settings

  1. Create/select a Google Cloud Project
  2. Enable the Required APIs
    • In the Google Cloud Console, navigate to "APIs & Services" > "Library
    • Search for and enable the following APIs:
      • Maps JavaScript API
      • Geocoding API
  3. Create API Credentials
    • Go to "APIs & Services" > "Credentials".
    • Click on "Create Credentials" and select "API Key".
    • Copy the generated API key for later use.
  4. Restrict the API Key
    • Click on the created API key to edit its settings.
    • Under "Application restrictions", select "Websites".
    • Add your domain (e.g., https://yourdomain.com/*) to the list of allowed referrers.
    • Also add these domains:
      • *.chainbox.dk/*
      • *.chainbox.io/*
      • *.local.chainbox.io/*
      • http://localhost/*
      • https://chainbox.dk/*
      • https://localhost:44354/*
      • https://www.chainbox.dk/*
    • Under "API restrictions", select "Don't restrict key".
    • Save the changes.
    • Go back to the "Credentials" page and ensure your API key is listed there.
    • Copy the API key for use in your application.
  5. Add the API Key to Your Webshop
    • Navigate to Chainbox Settings in Umbraco.
    • Go to services and update your Google API key.