From d13d414500481eeb1709e32756af8413c18e8863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Cercal?= Date: Fri, 17 Dec 2021 21:36:47 -0300 Subject: [PATCH] fix authentication problems when downloading card attachments --- trello_full_backup/backup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trello_full_backup/backup.py b/trello_full_backup/backup.py index 94af81e..e843bba 100755 --- a/trello_full_backup/backup.py +++ b/trello_full_backup/backup.py @@ -90,7 +90,8 @@ def download_attachments(c, max_size, tokenize=False): try: content = requests.get(attachment['url'], stream=True, - timeout=ATTACHMENT_REQUEST_TIMEOUT) + timeout=ATTACHMENT_REQUEST_TIMEOUT, + headers={"Authorization":"OAuth oauth_consumer_key=\"{}\", oauth_token=\"{}\"".format(API_KEY, API_TOKEN)}) except Exception: sys.stderr.write('Failed download: {}'.format(attachment_name)) continue