HubSpot API: Get All The Files
HubSpot does not have an explicit API endpoint to get a list of all the files. Instead one has to iterate over the all engagements and process contents of the property with the key attachments
on each engagement object. Then one could use value in url
payload to issue a GET request to download binary contents of the file.
Unfortunately, such list will also include so-called ‘hidden’ files, which are not accessible over API (and there is no way to download or un-hide them).
Files uploaded with the optional parameter hidden set to true will be inaccessible via the file manager or the URLs returned in the response. The hidden parameter is intended for files that are attached to engagements. Changing hidden from false to true will NOT hide existing files.
https://developers.hubspot.com/docs/methods/files/post_files
More info in HubSpot community: https://community.hubspot.com/t5/APIs-Integrations/Download-via-Hubspot-API-the-File-that-is-uploaded-in-Company/m-p/236708