API key (legacy) retirement

API keys (legacy) are permanent access tokens created before June 2024 that were used for accessing ArcGIS location services. Legacy API keys can no longer be created, and must be replaced with API keys generated from API key credentials.

This page contains essential information for updating your applications:

Example of a legacy API key item

API key legacy item

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 2026: Legacy API keys retired. They can no longer be used to authenticate with ArcGIS services.

Advantages of using API key credentials

API key credentials are an ArcGIS content item that can be used to create and manage API keys. These developer credentials offer several advantages over legacy API keys, including expanded access to ArcGIS services and enhanced management workflows.

Advantages of API key credentials include:

  • Access to ArcGIS Location Services and secure content items
  • Expanded access to spatial analysis services and portal operations
  • Configurable expiration date and referrer URLs
  • Support for API key rotation with up to two API keys per credential
  • ArcGIS Enterprise support

The following table compares the differences between API key credentials and legacy API keys:

API key credentialsAPI key (legacy)
Max number of keys (ArcGIS Location Platform account)No limit100 keys
Max number of keys (ArcGIS Online, cumulative across all organization members)No limit100 keys
Supported ArcGIS servicesArcGIS Location Services, Spatial analysis services, Portal serviceArcGIS Location Services
Item access privilegesSupported for all account typesSupported for ArcGIS Location Platform only
Max number of item access privileges100 items per credential100 items per key
API key expiration dateConfigurable (Duration of up to one year)Not configurable
API key rotation (?)SupportedNot supported
ArcGIS Enterprise supportSupported in ArcGIS Enterprise >= 11.4Not 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:

  1. Review the product and account requirements for API key authentication, and update your ArcGIS account if necessary.
  2. Find the API key (legacy) you want to replace and go to its item page.
  3. Review the scopes assigned to your legacy key.
  4. Create a new API key credential in your portal under My content > New item.
  5. Assign privileges to your credential to recreate the scopes of your API key (legacy).
  6. Save the item. Copy the new API key to a secure location, as it is only visible once.
  7. 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. With API key credentials, the term scope has been replaced by the term privilege. Privileges are assigned to API key credentials to control their access to location services and other secure resources.

The following table lists all of the scopes for legacy API keys, and the equivalent privileges for API key credentials:

API key (Legacy) scopeEquivalent privilegePrivilege string
BasemapsBasemap styles servicepremium:user:basemaps
Geocoding (stored)Geocode (stored)premium:user:geocode:stored
Geocoding (not stored)Geocode (not stored)premium:user:geocode:temporary
RoutingSimple routingpremium:user:networkanalysis:routing
Optimized routingOptimized routingpremium:user:networkanalysis:optimizedrouting
Closest facilityClosest facilitypremium:user:networkanalysis:closestfacility
Service areaService areapremium:user:networkanalysis:servicearea
Location allocationLocation allocationpremium:user:networkanalysis:locationallocation
Multi-vehicle routingMulti-vehicle routingpremium:user:networkanalysis:vehiclerouting
Origin/destination cost matrixOrigin/destination cost matrixpremium:user:networkanalysis:origindestinationcostmatrix
PlacesPlaces servicepremium:user:places
GeoEnrichmentGeoEnrichment servicepremium:user:geoenrichment

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.


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