Download files via API


I am using the API (python wrapper) to download message history and the file attachments come with a URL to be downloaded. When I try to download i python it always tells me 403, but when i use the browser it works if im logged in. If im not logged in it shows me 403. Could you show me how to download the files in python please ? or how to authenticate to be able to download the files ?

Thank you.


You might try passing a cookie along with the request formated like: rc_uid='id'; rc_token='token';

Take a peak at one of the file requests when running Rocket.Chat to get a better idea of what the cookie looks like. :slight_smile:


Thank you for your help. I will try that.