Downloading Private Trello Card Attachments

Hello!

I am having issues downloading Trello attachments using Trello API.

I am currently using two calls to download the attachment data -

  • one to get a list of all the attachments from a single card
  • one to download the attachment data using OAuth (https://api.trello.com/1/cards/{{$card_id}}/attachments/{{$attachment_id}}/download/{{$file_name}})

I can download the attachment data from Trello but I am having trouble decrypting the file data using PHP due to null bytes in the downloaded data.

What type of file encryption am I receiving from the API? Any ideas on decrypting the file data and storing it as a file?

Please help! Thank you!