Accessing services

In order to access the ArcGIS Online network analysis services, you will need an ArcGIS Online subscription. Once you have a subscription, you can create named users that can access your subscription. Each successful request to the services incurs service credits which are debited from your subscription based on the service used and the results returned from the service. The ArcGIS Online service credits page provides details about service credits for different network analysis services.

NoteNote:

This help topic describes how to connect the applications you create to the ArcGIS Online network analysis services. If you want to connect through ArcMap instead, read Connecting ArcMap to ArcGIS Online network analysis services.

Providing authentication credentials to ArcGIS Online

As a developer, you can provide authentication credentials in one of two ways: by prompting end users to enter their authenticated login or by storing credentials within the application.

Prompting end users to sign in

You can use the Identity Manager component in the client APIs to manage the login process. The Identity Manager simplifies the process of working with secure resources. It handles the process of prompting the user for their credentials, generating a token, and appending it to the request.

For example, If you are using the ArcGIS API for JavaScript to build your application, you can include the IdentityManager dijit in your application to handle authentication. The IdentityManager dijit allows users to sign into ArcGIS Online. Once the user has signed in, any subsequent REST requests made from within that client session using the esri.request object will automatically be part of that authenticated session. Using the IdentityManager also enables single sign on and identity flow for the case of fully hosted JavaScript web applications that are hosted within ArcGIS.com.

Similar facilities are available in the other client APIs.

Storing credentials within the application

You can hardcode the credentials in your application and use the REST API to obtain an access token in exchange for the application credentials. It is your responsibility to keep these application credentials secure. In most cases this implies keeping the credentials on the server and implementing a proxy service. For example, the ArcGIS API for JavaScript provides an example of how to implement such a proxy page.

Authentication using the REST API

To access the secured services Esri provides, you pass a token as parameter in your REST requests. Accessing services provided by Esri describes this process.

3/3/2017