How to access ArcGIS resources

1. Get an ArcGIS account

If you do not have an ArcGIS account, you can get one in the following ways:

  1. If association has an ArcGIS Online or Enterprise organization, your administrator can grant you an ArcGIS account.

  2. Otherwise, you can create a free developer account to get started.

2. Choose a type of authentication

You need to implement a type of authentication in your app to get an access token and access secure ArcGIS resources. The type of authentication you implement will determine the access privileges and billing method of your app.

The following types of authentication can be used to get an access token:

  1. API key authentication
  2. User authentication
  3. App credential authentication

Access tokens are always associated with an ArcGIS account. The associated ArcGIS account depends on the type of authentication used. The ArcGIS subscription of the associated account is charged when resources are accessed with the token. API key authentication and App credential authentication charge service usage to the app developer's ArcGIS account. User authentication charges service usage to the ArcGIS accounts of application users.

3. Get an access token

To get an access token, you need to implement a type of authentication in your application. Different types of authentication result in access tokens with different privileges. The diagrams below illustrate the different processes used to get an access token.

API key overview
The API key authentication workflow.

4. Make a request

Once you have an access token, you can include it in requests to ArcGIS REST APIs to access secure content and services.

To make a request to ArcGIS resources, you can use an HTTP request and include the access token as the token parameter. The format to access most REST API endpoints is as follows:

Use dark colors for code blocksCopy
1
https://<RESOURCE_URL>?token=<ACCESS_TOKEN>

Examples

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
curl https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/styles/arcgis/outdoor? \
-d "token=<ACCESS_TOKEN>"
Access a basemap from the basemap styles service.

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
curl https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates \
-d "f=pjson" \
-d "address=1600 Pennsylvania Ave NW, DC" \
-d "token=<ACCESS_TOKEN>"
Geocode an address with the geocoding service.

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
curl https://www.arcgis.com/sharing/rest/content/items/<ITEM_ID> \
-d 'f=pjson' \
-d 'token=<ACCESS_TOKEN>'
Get the details of an item from the portal service.

Tutorials

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