Unable to retrieve sensitive files via HubSpot's API

Hello HubSpot community,

I need assistance with a problem regarding retrieving sensitive files via the HubSpot API.

The following endpoint works perfectly for files *not marked* as sensitive:

`https://api.hubapi.com/files/v3/files/112892509422/signed-url`

However, for files marked as sensitive, it comes back with a 404 error. This leads me to believe that it’s not possible for a sensitive file to be retrieved from the API. Is this true? If not, please can you assist?

The right scopes are selected for the private app.

Kind regards,

Hadi

Further to my last message,

I realised the scope files_ui_hidden.read was not selected. After selecting it, I’m now encountering another error.

When I call https://api.hubapi.com/files/v3/files/112892509882/signed-url, it comes back with a URL. When I try to view this URL, I get a 400 HTTP error.

Please can someone help in resolving this issue?

I’m getting the same error, did you find a workaround?
There is no documentation about retrieving files uploaded via forms and stored on a sensitive property :neutral_face:. Please someone help!

Hi Rick, we found a genius workaround. We surrounded the functionality concerned with the retrieval of sensitive documents with a try and catch block. Ultimately, when the retrieval fails, the catch block gets triggered. Within this catch block, we added functionality that will generate a text file which includes the HubSpot document link. Our client is then able to open this document and click on the link which would take them back to Hubspot with the document open and previewed.

Hope this helps!