temporary link / url for the attachments of an issue

JIRA provides a way to access the attachments of an issue using basic auth, jwt auth mechanisms. Using which we can download those files. We’re able to download the files using both authentication mechanisms.

sample jwt auth:

curl -X GET --url https://{site-name}.atlassian.net/secure/attachment/1001/example.txt -H 'Authorization: jwt ’

Issue / Our requirement:

But is there a way to generate temporarily accessible url for the JIRA issue’s attachments which will have token embedded into the URI itself. I’ve added the example of that below

example url:

https://{site-name}.atlassian.net/attachment/1001/example.txt?token={temp_access_token}

While accessing / clicking on the above mentioned url the download should automatically start even if the user isn’t logged into their account

Reason for our requirement:

We’re creating jira cloud based service / app and one of its feature is providing access to the user’s attachments through our application. Our limitation(cloud service cost) is that we can’t download all the huge sized attachments and store and manage it. So we’re looking for a solution using which user’s can download from the JIRA’s server directly.