I'm trying to use the Files Api to fetch a file by ID and then view the file that have been attached as part of Engagements, like tasks/emails etc. The issue I'm having is, I can't view the file with the url (https://cdn2.hubspot.net/hubfs/....). I get a 404 error. If I try to use the s3_url, I get a 403 Forbidden error.
Could this alternatively be because the files where attached through Engagements? Is there something that we can change through settings so that the files could be accessed publicly?
It may be a case that file do not allow anonymous access. You can check this in the meta of the file if the parameter is set to false. Also please try to use other parameters for accessing the file like: friendly_url, url, alt_url.
Also which oauth method you are using to make the API call? If its access token method then make sure you have valid scopes/permissions.
Thanks for such a quick response Himanshu! You are right, the "allows_anonymous_access" property is set to FALSE. Is there a setting where we can set it to TRUE. Or is this because it's an attachment on an Engagement?