Download attachments with API

How can I obtain a public download link for an attachment? We are provided with detailed information about the attachment via URL, but it’s not possible to access the file through it without authorization. All the solutions we’ve found so far are not working. Is there currently any way to retrieve attachments using an API?

You probably have solved it by now, but for the benefit of everyone else searching in the future, this post solved it for me: Update: Authenticated Access to S3

Specifically, this curl command gave me everything I needed to make it work:

curl -H "Authorization: OAuth oauth_consumer_key=\"{{key}}\", oauth_token=\"{{token}}\"" https://api.trello.com/1/cards/5e839f3696a55979a932b3ad/attachments/5edfd184387b678655b58348/download/my_image.png