Skip to main content
All CollectionsAdvanced
Google Maps API in Zapiet - Rates by Distance
Google Maps API in Zapiet - Rates by Distance
Jelizaveta avatar
Written by Jelizaveta
Updated over 3 weeks ago

If you’ve chosen Google Maps as a route provider in Zapiet - Rates by Distance, you’ll need to set up your API key and add it into your settings.

Google provides a free trial of 90 days, or until $300 USD of credit has been used. After the free trial, they provide $200 USD of free credit per month which is more than enough for most merchants.

Should you exceed their free limit, you will be charged for your usage. View their plans and pricing for more information.


Requirements

  • You need to have an active Google account.


Create a Google Maps API Key

If you have an existing Google Cloud account with open projects, follow the steps for Existing Google Cloud users.

New Google Cloud users

  1. Visit the Google Maps Platform page and click Get started.

  2. If needed, sign in to your Google Account.

  3. Continue to add business and billing details.

  4. Copy the API key and tick Enable all Google Maps API's for this project.

  5. Click Go to Google Maps Platform.

  6. Do not add a restriction. Click Maybe later.


Existing Google Cloud users

  1. Visit the Google Maps Platform page and click Get started.

  2. If needed, sign in to your Google Account.

  3. Click the open project name.

  4. Click New project.

  5. Add a project name, and click Create. You can also add a location if needed.

  6. Click Select project.
    You may have to wait a moment for the project to be created.

  7. Click Keys & Credentials.

  8. Copy the API key and tick Enable all Google Maps API's for this project.
    You can also enable budget alerts.

  9. Click Go to Google Maps Platform.

  10. Do not set a restriction. Click Maybe later.

You can now add the API key you've copied to the Zapiet - Rates by Distance settings.


Add the API key to Zapiet - Rates by Distance

  1. In Zapiet - Rates by Distance, click Settings.

  2. In Route and address provider section, select Google Maps.

  3. Enter your Google Maps API key.

  4. Click Save.


Troubleshooting

If your API key is invalid, you follow the troubleshooting steps below.

You can check the validity of your Google Maps API key through the link below. Copy the link to your browser and replace the API_KEY with your Google Maps API key.

Compare the error messages with the error messages below.


Error message: "This API project is not authorized to use this API."

This could mean that not all of the API's have been enabled, or that the API has been restricted, or both.

To check if the API's have been enabled:

  1. Click APIs and services.

  2. Check the following API's are enabled:

    • Geocoding API

    • Distance Matrix API

  3. If any are disabled, click Enable.

Repeat until both API's are enabled, and then test the API key.

If it is still showing an error, check if any restrictions have been placed on the API.

  1. Click Keys & Credentials.

  2. Under Actions, click ⋮ and then click Edit API.

  3. Disable any restrictions.

  4. Click Save.

You can now test the API key again.


Error message: "The provided API key is invalid."

The API key added in Zapiet - Rates by Distance may be missing some characters, or a blank space may have been added.

  1. Click Keys & Credentials.

  2. Go to API keys and click Show key.

  3. Copy your API key.

Carefully re-enter your API key in Zapiet - Rates by Distance and test again.


Error message: "You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable ..."

  1. Go to https://console.cloud.google.com/project/_/billing/enable and select the project with your Google Maps API.

  2. You may need to create a billing account.

  3. Or you may need to update your payment information.

Once this has been added or changed, test the API key again.

If you are struggling to resolve the issue, reach out to us at [email protected].


Next step

Did this answer your question?