Accessing Authed Attachments On Private Boards

It looks like downloading files from private boards is not possible, it’s always 401 error. Why is that so?

:wave: A house-cleaning note: I moved this to its own topic as the question is worth addressing by itself and not dependent on the previous topic on which it was asked.

Are you using the token of a user that has read access to the private board?

1 Like

I have access to everything except downloading the files the way you described in Update: Authenticated Access to S3 - #12

I get 401 Unauthorised.

More people are having this issue also:

Thank you!

Did you check out this answer?

It includes a nice gist of code that works, as expected: Make private Trello board attachments publicly-available.!/private-trello-attachment-proxy · GitHub.

Can you share a code snippet of the code you have in place that is failing?

This is in python

def download_attachment(
    card_id: str,
    attachment: dict,
    url = f'{BASE_URL}/1/cards/{card_id}/attachments/{attachment["id"]}/download/{attachment["name"]}'
    headers = {
        'Authorization': f'OAuth oauth_consumer_key="{apiKey}", oauth_token="{apiToken}"'
    res = requests.get(url, headers=headers)
    return res

It was the quote, " in the header string. Of course it was. Half a day gone into oblivion.

Remember kids, it’s not the code, documentation or examples, it’s you.

1 Like


Glad you got it figured out!

1 Like