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.
-
Go to the API key page in your portal.
-
On the left, click +New API Key and set the:
- Title:
Tutorials
Key - Description
An AP
I key to use for tutorials.
- Title:
-
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.
-
In the Overview page of the API key, locate Location services at the bottom.
-
In the Location services pane, click Configure services.
Add scopes by checking the following service cards:
- Basemaps
- Geocoding (not stored)
- Routing
- Service areas
- Places
-
Click the Configure service(s) button.
Copy the API key
- 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.