PROBLEM

Unable to access ArcGIS REST Services Directory page of an ArcGIS Online item

Last Published: November 19, 2021

Description

Attempts to access the ArcGIS REST Services Directory page of an item in ArcGIS Online fail, and return the following error:

Error:
Token Required
Token Required error in ArcGIS REST Services Directory

Cause

  • The ArcGIS REST Services Directory page is accessed directly using the URL through the Copy button and not the View button. When accessing the ArcGIS REST Services Directory page by copying the URL on the Item Details page, a token is not generated and appended to the URL. This prevents the page from being viewed without logging in.
  • The item is shared privately, for example, only with certain groups. 

Solution or Workaround

Depending on the cause, choose one of the workarounds below.

Access the ArcGIS REST Services Directory through the View button in ArcGIS Online

On the item's Overview page, click the View button to access the ArcGIS REST Services Directory.

The View button in ArcGIS Online Overview page

Share the item publicly or to an identified user, or generate tokens for the service URL

To change the item's sharing option, refer to ArcGIS Online: Share items. If the page must be accessible to users outside the shared group, tokens can be generated to allow access. The steps below describe how to generate a token.

  1. Navigate to the following URL on a web browser, replacing USERNAME and PASSWORD with the owner's username and password to generate a token.
https://www.arcgis.com/sharing/generateToken?f=json&username=USERNAME&password=PASSWORD&referer=http://www.arcgis.com
  1. Append the generated token parameter using ?token=<generated token> parameter at the end of the service URL, as shown in the following sample, to access the item's ArcGIS REST Services Directory.
https://services.arcgis.com/123456/arcgis/rest/services/survey123_sample/FeatureServer?token=1234567890

Article ID:000026829

Software:
  • ArcGIS Online

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic