PROBLEM
In ArcGIS Online, on the Data tab of a hosted feature layer, clicking an attachment URL copied from the ArcGIS Survey123 website in the attribute table redirects to the ArcGIS REST Services Directory and returns the following error message:
Error: Invalid token.
The token required to access secure content and resources such as attachments on the feature service has expired. When accessing attachments of a feature through other applications such as ArcGIS Online Map Viewer, a token is automatically added to the URL. ArcGIS tokens have an expiration for security purposes, as it ensures limited access within the organization for items not publicly shared. When using the URL to embed secured content for indefinite use, the URL with token enabled is not optimal as it is bound to expire and the item will no longer be available for viewing.
The steps below describe the best practice to obtain the attachment URL collected via the Survey123 survey to be stored in the attribute table of the hosted feature layer in ArcGIS Online.
Note: The Export Attachment tool is available in ArcGIS Pro 3.3 and later.
Article ID: 000032764
Get help from ArcGIS experts
Download the Esri Support App