So I have a Survey 123 that captures a photo and stores it as an attachment based on the JSON being passed into my WebHook and the Data displayed in the Item Details data Panel.
The portion of the Webhook for the attachment gives the URL and the Name (See Below). So I thought I could take the URL plus the Name and put it into an <img> src="......." </img> to embed the image into an email MIME format message. When I went to test the resulting URL in my browser it failed with a token-required message. If I add a ?token=...... to the URL am I not creating a security issue?
TIA --
sprintf("<img alt=\"Documenting Photo\" height=\"128\" width=\"128\" src=\"%s/%s\" />", $bodyJSON['feature']['attributes']['Photo'][0]['url'], ['feature']['attachments']['Photo'][0]['name']);

[attachments] => Array
(
[Photo] => Array
(
[0] => Array
(
[globalId] => {..........}
[parentGlobalId] => {..........}
[name] => Photo-20240106-160729.jpg
[contentType] => image/jpeg
[keywords] => Photo
[size] => 86358
[id] => 6
[url] => https://services2.arcgis.com/.............../arcgis/rest/services/......../FeatureServer/0/17/attachments/6
)
)
)