Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Download Attachment Content return a Authentication Page

Thiago Moraes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 1, 2024

 

Hello everyone, how are you?

 

Using the REST API, I retrieve an issue and collect the attachment content that has the following endpoint: https:///<my.jira>.com/secure/attachment/330878/<image_name>.png And when I make a GET request using Rust to download the file, it returns an authentication page.

 

I've tried using other languages ​​and the error is the same, and if I call another endpoint, the session is still active and working.

 

I noticed that there are some questions about this but no solution has been found. Does anyone have an idea of ​​how to solve it?

1 answer

0 votes
Thiago Moraes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 1, 2024

Well, doing an analysis, the authentication method is allowed for me to do in my Jira, it does not support the request of /secure/ endpoints.. for example. With /rest/api endpoints the session works normally. So you can do this test

Using the web, access the image you want to download, go to DevTools, copy the CURL and download the image, you will receive a status code 200 and if you use the same session you will receive a 302 redirecting to authentication

Suggest an answer

Log in or Sign up to answer