Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

trello REST API: getting 401 (unauthorized) when downloading attachment



My app had worked well though the trello API until yesterday. The same client could read cards and download attachments. Now it only can read cards but when trying to download attachments, it gets 401 response. The app uses the user token for authentication. When downloading, it uses the same cookie scope obtained from the previous API REST requests and it had worked before yesterday. Nothing was changed in the app! I've updated the user token - to no success. 

Can anybody suggest what happens there? How attachments can be downloaded though the API?

Thank you!



2 answers

1 accepted

0 votes
Answer accepted

Thank you for the right direction!

That page is actually obsolete and forwards to an update: Update: Authenticated Access to S3 - Trello / Trello Announcements - The Atlassian Developer Community


They still advise there that does not work anymore:

If you are using the files directly in your application as a single user, you can add in an API key and token to the request to the /download/ URL.


And what works for me right now:

Making a GET request with the key and token in the Authorization header will return the hosted file.

For instance, here is how you’d make the request with curl for an attachment with the ID 5edfd184387b678655b58348 and the attachment file named my_image.png:

curl -H "Authorization: OAuth oauth_consumer_key=\"{{key}}\", oauth_token=\"{{token}}\"" https://api.trello.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Trello

Taco Tuesday: New years' resolutions with Trello

Congratulations to @Laura Holton , our latest winner of Taco Tuesday! And thanks to @Kristján Geir Mathiesen for sharing the picture of Taco having fun with his new friend  B...

2,303 views 28 40
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you