Verifying your Google Maps API Key

Stockist supports using Google Maps as the map provider for your store locator. When you select Google Maps as your map provider, we'll use a key you provide from Google to power the map and parts of the search.

Google Maps functionality is divided into several “services” that each enable separate features. Stockist relies on three of them to work properly:
  • Maps JavaScript API: Used to display the map imagery
  • Geocoding API: Used to help match searches to specific places  
  • Places API: Used to show address suggestions when searching

In the Google Maps dashboard, you'll need to ensure that all three of these services are "enabled". The steps on this page will check that your key is set up correctly.

Possible errors caused by an incorrect Google Maps key

If your Google Maps key is missing one of these services, you may notice an error on your store locator. If the Maps JavaScript API is missing, you'll see a grey box showing Oops! Something went wrong:

If the Places API is missing, you might see a popup near the search bar like the following:

If the Geocoding API is missing, typed-in searches will fail with an error message.

Fixing the problem

There are three separate things to check to ensure your key is set up correctly:

1) Ensure the three Google Maps services are enabled

Follow these steps to ensure the necessary services are enabled for your key:

  1. Open the Google Maps Platform > APIs & Services page on the Google dashboard. If needed, sign into the Google account you used to create your key.
  2. Ensure that the correct project is selected at the top of the page: 

    The project name shown should match the project that you created when initially setting up your Google Maps key.

  3. Find Maps JavaScript API in the list. If there's a button labeled Enable, click it to turn on the service:

    If the button says Disable, the service is already enabled, and you can move to the next step.

  4. Find Geocoding API in the list. If there's a button labeled Enable, click it to turn on the service:

    If the button says Disable, the service is already enabled, and you can move to the next step.

  5. Find Places API in the list. If there's a button labeled Enable, click it to turn on the service:

    If the button says Disable, the service is already enabled.

Once you've enabled all three APIs, your project should be set up to work correctly with Stockist.

If you still encounter an issue, follow the steps in the next section.

2) Ensure your key is from the project where the services were enabled

If you've enabled all three services but the Stockist dashboard still shows that your key is missing the services, another issue could be if the services were enabled in a different "project" than the key.
It’s possible to create multiple different "projects" in the Google Maps dashboard, and each project has its own set of keys and enabled services. If your key is in a different project than the one where the services were enabled, the key still won't be able to access the services.
To check if this is the problem, you can follow our guide to find the list of keys in the currently selected project in the Google dashboard. You'd want to double-check that the key you added to Stockist is in the "API Keys" list. If your key isn't shown in the list, it's from a different project (or different Google account).
If your key isn't listed there, you can use another key from the list (if there are any), otherwise you can add a new key to the project with the steps halfway down the linked article and then copy/paste the newly created key into Stockist.

3) Checking for key restrictions

If the steps above didn’t resolve the issue, another possibility is that your key has been restricted to only work with certain services. There are two levels of permission in your Google project:

  1. Your project must have the 3 necessary APIs enabled (covered in the section above)
  2. Your API key must have access to the 3 necessary APIs (covered in this section). One project can have multiple API keys (although you only need one), and each key can be restricted to only work with a certain set of APIs.
To ensure the necessary services are permitted for your key:
  1. Open the Credentials page of the Google dashboard.
  2. Find your API key in the list and click on the name:

  3. Check for any restrictions under API Restrictions.  You want to ensure that either Don't restrict key is selected or, if Restrict key is selected, ensure that all 3 services (Maps Javascript API, Geocoding API, Places API) are included in the permitted APIs:


Need help?

If the steps above didn't solve your issue, we're here to help! Just click Contact Us at the top of this page, or send us a message on the Contact page of your Stockist dashboard.