APIs & Integrations

AGuardeño
Participant

[API v2] CMS File Manager doesn't return data of existing file uploaded in HubSpot

Hello,

I need to obtain the fileId of a pdf file that it's uploaded in the HubSpot of my company. The URL of the file i like this: https://app.hubspot.com/documents/<number1>/summary/<number2>

 

I tried to use number2 to obtain its metadata (for its fileId) through the API, but the response appears empty though the file exists if I access it through the URL.

 

Any idea of how to obtain the fileId through the URL? Or it can be related to another issue, a permissions issue perhaps?

Regards,
Alicia

0 Upvotes
2 Replies 2
miljkovicmisa
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

[API v2] CMS File Manager doesn't return data of existing file uploaded in HubSpot

👋@dennisedson and @AGuardeño !
I would definately go about it by searching the files, although depending on the meta the OP needs maybe it could end there without the need for an ID as search already responds with the properties of the file.

Here is the documentation link for the search API. 

@AGuardeño If you need any help with looping through the resutls of the returned object don't hesitate to write here.

If my answer was helpful please mark it as a solution.

dennisedson
HubSpot Product Team
HubSpot Product Team

[API v2] CMS File Manager doesn't return data of existing file uploaded in HubSpot

@AGuardeño 

Are you still working with this?

that number is not the ID of the file (as you have gathered 🤣)

If you know the name of the file, you could do a search and filter your results to the name.  Then you would see the ID.

@miljkovicmisa 👋, how would you go about this?

0 Upvotes