AnsweredAssumed Answered

Downloading incident attachments via the API

Question asked by Applications on May 31, 2018
Latest reply on Jun 4, 2018 by Devin Janus

When I retrieve an incident's details via the API, the response body contains attachments details, e.g:
$ curl --digest -u '[username]:[password]' -H 'Accept: application/vnd.samanage.v1.3+json' -X GET ''
         "filename":"Campaign GPS screenshots 20180411.docx",
However I don't seem to be able to download the file via the API using any of the URLs provided in the response. The secure_url redirects to the Amazon S3 url, following the redirect results in an Access Denied error:
$ curl -o attachment.docx "\u0026Expires=1525898206\u0026Signature=X56xUhJon0TVD7Lrjx%2B9eFRy2oU%3D"
<Message>Access Denied</Message>


The Amazon URL appears to be valid for about 10 minutes, and I sent the request within that time limit. Why am I getting an access denied error?