Problem: Unable to access ArcGIS REST Services Directory page of an ArcGIS Online item
Attempts to access the ArcGIS REST Services Directory page of an item in ArcGIS Online fail, and return the following error:
Error: Token Required
- 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.
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.
- Navigate to the following URL on a web browser, replacing USERNAME and PASSWORD with the owner's username and password to generate a token.
- 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.
- ArcGIS Online: Share content
- ArcGIS REST APIs: Using the Services Directory
- ArcGIS REST APIs: Generate Token
Last Published: 11/18/2021
Article ID: 000026829