API keys (legacy) are permanent access tokens
This page contains essential information for updating your applications:
Retirement timeline
This timeline shows the lifecycle and deprecation of API keys (legacy)
-
June 2024: Legacy API keys in mature support. They can no longer be created or edited.
-
June 2025: Legacy API keys in extended support. Retirement date June 2026 announced.
-
June 27, 2026: Legacy API keys revoked. They can no longer be used to authenticate with ArcGIS services.
Advantages of using API key credentials
API key credentials
Advantages of API key credentials include:
- Access to ArcGIS Location Services
ArcGIS Location Services, also referred to as Location Services, are services hosted by Esri that provide geospatial functionality for developing mapping applications. They include the ArcGIS Basemap Styles service, ArcGIS Static Basemap Tiles service, ArcGIS Places service, ArcGIS Geocoding service, ArcGIS Routing service, ArcGIS GeoEnrichment service, and ArcGIS Elevation service. An ArcGIS Location Platform or ArcGIS Online account is required to use the services. and secure content itemsAn item, also known as a content item, is a resource stored in a portal such as a web map, hosted layer, style, script tool, file, or notebook. - Expanded access to spatial analysis services
Spatial analysis services are services that perform geometry and statistical analyses on feature and raster data. and portalA portal service provides the functionality to securely create, access, and manage content, data services, users, and groups in a portal. The service can be hosted by Esri or in ArcGIS Enterprise. operations - Configurable expiration date and referrer URLs
- Support for API key rotation with up to two API keys per credential
- ArcGIS Enterprise
ArcGIS Enterprise is a GIS mapping, analytics, data hosting, and content management product that can be hosted on-premise or in a cloud infrastructure. It includes software, applications, tools, APIs, and services for users and developers. support
The following table compares the differences between API key credentials
| API key credentials | API key (legacy) | |
|---|---|---|
| Max number of keys (ArcGIS Location Platform account | No limit | 100 keys |
| Max number of keys (ArcGIS Online | No limit | 100 keys |
| Supported ArcGIS services | ArcGIS Location Services | ArcGIS Location Services |
| Item access privileges | Supported for all account types | Supported for ArcGIS Location Platform only |
| Max number of item access privileges | 100 items per credential | 100 items per key |
| API key expiration date | Configurable (Duration of up to one year) | Not configurable |
| API key rotation (?) | Supported | Not supported |
| ArcGIS Enterprise | Supported in ArcGIS Enterprise >= 11.4 | Not supported |
How to switch to API key credentials
API key credentials can be used as a direct replacement for API keys (legacy). They are backwards compatible with all of the same privileges to access ArcGIS location services. The general steps to replace a legacy API key with API key credentials are:
- Review the product and account requirements for API key authentication, and update your ArcGIS account if necessary.
- Find the API key (legacy) you want to replace and go to its item page
An item page is a web page in ArcGIS Online or the developer dashboard used to access and manage the properties for an item and the content it references such as a web map, hosted layer, or file. . - Review the scopes assigned to your legacy key.
- Create a new API key credential
API key credentials are an item that contains the parameters used to create and manage long-lived access tokens for API key authentication. They are a type of developer credential. in your portal under My content > New item. - Assign privileges
Privileges are a set of permissions assigned to ArcGIS accounts, developer credentials, and applications that grant access to secure resources and functionality in ArcGIS. to your credential to recreate the scopes of your API key (legacy). - Save the item. Copy the new API key
An API key is a long-lived access token created using API key credentials. They are valid for up to one year and are typically embedded directly into client applications. to a secure location, as it is only visible once. - Replace the API key (legacy) in your application with the new API key you created.
API key (legacy) scopes
Legacy API keys were assigned scopes that controlled their access to ArcGIS location services
The following table lists all of the scopes for legacy API keys, and the equivalent privileges for API key credentials:
Tutorials
Update to API key credentials
Migrate from an API key (legacy) created before June 2024 to an API key from API key credentials.
Create an API key
Create and configure API key credentials to get a long-lived API key access token.
Manage API key credentials
Manage previously created API key credentials to regenerate, edit privileges, and edit item access of API keys.