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}}\""