Set up the Routes API

  • Google Maps Platform secures its products by requiring API keys for authentication and billing purposes.

  • API keys can be created and managed through the Google Cloud Console or the Cloud SDK.

  • It's crucial to restrict API keys to specific applications and IP addresses for enhanced security.

  • You need to include your API key in every Routes API request, preferably using HTTPS.

European Economic Area (EEA) developers

This document describes the prerequisites for using the Routes API, how to enable it, and then how to make an authenticated request.

Enable the API

Before you can use Routes API, you must use the Google Cloud console or the gcloud command to enable it in your Google Cloud project.

To enable the API:

Console

  1. Open the product page in the Google Cloud console:

    Enable the Routes API
  2. Click the Enable button.

gcloud

gcloud services enable \
    --project "PROJECT" \
    "routes.googleapis.com"

Read more about the Google Cloud SDK , Cloud SDK installation , and the following commands: