Security and authentication
The ArcGIS Platform supports secure access to location services and private data. It ensures that only valid, authorized users and services access protected information. To access secure resources, you need to implement an authentication method so your applications can make authenticated requests to services.
To get started with authentication:
An authentication method is the process used obtain an access token. Your app must present an access token whenever it makes an authenticated request to location services. Access tokens define the scope and permissions available to your application. The authentication method you use to get an access token will vary.
There are three kinds of access tokens:
- API key: a permanent token that grants your application access to ready-to-use services and, with an ArcGIS Developer account, private content (currently in beta).
- ArcGIS identity (formerly named user): grants a short-lived token, generated via OAuth 2.0, giving your application permission to access the content and services authorized to an existing ArcGIS user's account.
- Application credentials: grant a short-lived token, generated via OAuth 2.0, authorizing your application to access ready-to-use services.
To make authenticated requests to services, you need to set the
token parameter to an access token.
An API key is a permanent access token that grants your public-facing application access to specific, ready-to-use services, and, with an ArcGIS Developer account, private content, items, and limited client referrers (currently in beta).
Use API keys when you want to:
- Quickly write applications that consume ready-to-use services.
- Provide access to services without requiring users to sign in with an ArcGIS account.
- Use an access token that doesn't expire.
An API key is created for you when you sign up for an ArcGIS Developer account.
Set the API key according to your chosen client API to authenticate with ArcGIS Platform.
An ArcGIS identity, also known as named user, grants a short-lived access token giving your application permission to access the content and services authorized to your application user's existing ArcGIS Online or ArcGIS Enterprise account. This temporary token is created using OAuth 2.0 protocol and authorizes your application to act on the user's behalf without revealing their secure password to your application. Any service credits your application consumes are metered to the authenticated user's ArcGIS subscription and, during the authenticated period, your app can access your user's content on their behalf.
Use ArcGIS identity when you want to:
- Ensure users are signed in and authenticated with their own ArcGIS account.
- Use your app user's credits to pay for their private data, content, or service transactions.
- Limit the length of time users can be signed in to your app with a temporary token.
- Register your application in the developer dashboard to receive client credentials.
- Implement an Oauth 2.0 authentication workflow.
- User authorizes your application.
- The ArcGIS Platform exchanges the authorization code from user authorization for a temporary ArcGIS identity.
- Use the ArcGIS identity to authenticate with ArcGIS Platform according to your specific client API.
Application credentials grant a short-lived access token, generated via OAuth 2.0, authorizing your application to access ready-to-use services such as basemap layers, search, and routing.
Use application credentials when you want to:
- Access ready-to-use services with a secure process and a short-lived token.
- Provide access to services without requiring users to have an ArcGIS account.
- Register your OAuth 2.0 application in the developer dashboard to receive credentials.
- User requests a resource on your web server.
- Implement the Oauth 2.0 client credentials workflow to generate an application credential.
- Respond to the user's request with the application credential
- Use the application credential to authenticate with ArcGIS Platform according to your specific client API.
|You are building an app that only requires access to ready-to-use services, such as the basemap layer, geocoding, or routing services.||API key|
|You are building an app that allows users to view and edit private data in ArcGIS Platform.||ArcGIS identity|
|You are building an application on a web server or API backend that only requires access to basemaps and geocoding.||Application credentials|
|You are building an application using Esri Leaflet, Mapbox GL JS, or OpenLayers.||API key|
|You are building an application using an ArcGIS API.||API key or ArcGIS identity|
|API keys||ArcGIS identity||Application credentials|
|Short lived tokens|
|Restrict to specific services|
|Private data hosting services|
|API keys||Application credentials||ArcGIS identity|
|ArcGIS Runtime API for Android|
|ArcGIS Runtime API for iOS|
|ArcGIS Runtime API for Java|
|ArcGIS Runtime API for .NET|
|ArcGIS Runtime API for Qt|
|ArcGIS API for Python|
|MapBox GL JS|
|ArcGIS REST JS|