Tutorial: Create an API key

An Application Programming Interface key (API key) is a permanent access token that defines the scope and permission for granting a public-facing application access to ready-to-use services.

In this tutorial, you create, configure, and scope an API key that can be used to access ArcGIS location services.

Prerequisites

You need an ArcGIS Location Platform account or ArcGIS Online account to create an API key to access location services.

Steps

Create an API key

The portal is the tool you use to create and manage API keys.

  1. Go to the API key page in your portal.

  2. On the left, click +New API Key and set the:

    • Title: TutorialsKey
    • Description An API key to use for tutorials.
  3. Click Create API key

Scope the API key

API keys can be scoped to access different services, service capabilities, and private content. Before using an API key, you need to set the proper scopes.

  1. In the Overview page of the API key, locate Location services at the bottom.

  2. In the Location services pane, click Configure services.

    Add scopes by checking the following service cards:

    • Basemaps
    • Geocoding (not stored)
    • Routing
    • Service areas
    • Places
  3. Click the Configure service(s) button.

Copy the API key

  1. In the Overview page, click the copy icon so you can use the API key in your application.

Now you have an API key that is now scoped to access the location services in the tutorials.

What's next?

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.