1. π Get access token
Number of APIs: 4
You can access ArcGIS location services and private data with different authentication methods to ensure that only valid, authorized users and services access protected information.
Your app must present an access token whenever it makes an authenticated request to location services. Access tokens define the scope and permissions available for your application. To get an access token, you need to implement a type of authentication in your app. The type of authentication you use to get an access token will vary.
There are three types of authentication that can be used to obtain an access token:
- API key authentication: This creates a permanent token that grants your application access to location services and, with an ArcGIS developer account, private content.
- User authentication (formerly ArcGIS identity): This generates a short-lived token via OAuth 2.0, authorizing your application to access location services, content, and resources on behalf of a logged in ArcGIS user.
- App credential authentication: This generates a short-lived token via OAuth 2.0, authorizing your application to access ready-to-use services on your behalf.
How to get an API key
- Sign in with an ArcGIS account. If you don't have an account, you can sign up for a free developer account.
- Use your developer dashboard to create an API key to access location services.
Learn more
To better understand what authentication method suits your needs, visit the following resources:
-
User authentication - generateToken-spec POST https://www.arcgis.com/sharing/rest/generateToken
-
App credential authentication-Examples - Application credential request POST https://www.arcgis.com/sharing/rest/oauth2/token
-
App credential authentication - oauth2-token-spec POST https://www.arcgis.com/sharing/rest/oauth2/token
-
User authentication-Examples - Generate token POST https://www.arcgis.com/sharing/rest/generateToken