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?