HubSpot Ideas

markkofman

Ability to access hidden files over the API

At the moment there is no way to access hidden files over the API. Meaning that almost any files that are related to engagements are not accessible to the users. 

 

Also, there is no export capability for that. Basically this makes it totally impossible to access your own data in HubSpot account.  

9 Replies
lucasverra
Participant

Exactly same issue. I need to access my own files via an APi , like any proper CRM would allow.

 

This lack of access to my files restrict the usage of api based automations. It would begreatly appreciated. Thanks

cimar007
Participant

Same problem here. I do not understand why this is not available. 

 

I am able to retrieve the attachment info (id, cloud key, etc) but I can not access the file. 

 

It makes no sense. 

 

Hubspot please help, add this endpoint. 

 

Make our lives easier. 

 

Thanks

Kamil_KK
Contributor | Platinum Partner

Hello, I am facing the same issue.

As I was investigating there is a type of solution:

You can get signed URL

https://legacydocs.hubspot.com/docs/methods/files/get-signed-url-private-file

Apparently this works for me while I am trying to access ticket attachments.

The issue here is that there is no possibility to change file flag from 

"hidden": true, and this would be a great help. Please upwote this proposal - https://community.hubspot.com/t5/HubSpot-Ideas/Have-the-access-to-change-a-file-from-quot-hidden-quo...

We are able to change access properties of the files that are not 'hidden' by default:

https://legacydocs.hubspot.com/docs/methods/files/update_file_access

PUBLIC_INDEXABLE

PUBLIC_NOT_INDEXABLE

PRIVATE

However, once you encounter file hidden by default the 'access' property is set like so: 

"access": "HIDDEN_PRIVATE"

and there is no possibility to nicely 'shuffle' / update 'access' properties - I have tried minion times -

{

    "taskId": "7d9cb1cc-3394-3b43-b11d-3e753deeed9b",

    "message": "Set-Accessibility task successfully enqueued",

    "portalId": XXXXXXXX

}

despite of that the 'access' property stays unchanged - "access": "HIDDEN_PRIVATE"

 

Therefore what we really need here is a possibility to change the 'hidden' flag of the file  true/false.

 

Still, it is possible to access hidden files via API call (at least in case of tickets associations - engagements -> NOTE and note points to attachment).

I am not able to say if it is possible with other 'hidden' files from deal etc. Please feel free to try it out.

This solution also requires calling for every file because a signed URL gives access to one "HIDDEN_PRIVATE" file at a time.

 

I hope this will help.

sockclub
Participant

Experiencing the same issue. It seems strange that we can't access the actual files from the API.

DWilsonBE
Member

Getting access to attached files would be extemely useful for our automation needs. And could also be very useful way to purge attachments for privacy when we archive old deals.

MarcD
Member

It seems that enabling the scope "files_ui_hidden.read" has solved the issue for me using the v3 API, as mentioned in the CMS API here (Changes in V3 section): https://developers.hubspot.com/docs/api/files/files

 

One needs to go to the private app settings (or OAuth if you're using it?) and enable this scope for the given private app. I'm still testing for full details but I expect to be able to use a combination of this scope to get metadata and the signed url to get the file itself.

 

MHirth
Participant | Diamond Partner

Hello @MarcD is it working? Thanks for your answer

JMadrone
Member

Not totally sure of what your use case is for downloading the files, but this app will allow you to grab the contents of a file uploaded through a form into a file property and parse the contents out of it: https://ecosystem.hubspot.com/marketplace/apps/marketing/data-management/go-file-text-parser-1545207

 

And this one is a good one for managing file attachments and associations between objects: https://ecosystem.hubspot.com/marketplace/apps/marketing/data-management/file-attachment-association... 

NickMc
Member

In the V3 Files API, to access any PRIVATE_HIDDEN files you have to have the `files.ui_hidden.read` scope (on top of the regular `files` scope) and use 

`/files/v3/files/FILE_ID` and `/files/v3/files/FILE_ID/signed-url` endpoints.
 
You CANNOT use the search endpoint. The search endpoint does not search PRIVATE_HIDDEN files. But I would love this.
 
You also CANNOT change the `access` of a PRIVATE_HIDDEN file using the "update file properties" PATCH (/files/v3/files).