Hello Everyone, I want to fetch or download attachment file using API. I am trying to below but there is not content in reponse.
https://developers.hubspot.com/docs/api/files/files
GET/files/v3/files/{fileId}
Hello Everyone, I want to fetch or download attachment file using API. I am trying to below but there is not content in reponse.
https://developers.hubspot.com/docs/api/files/files
GET/files/v3/files/{fileId}
Hey, @dipeshpatel
Quick question — will it work when you test from the endpoint page or using Postman?
I ran a quick test using a Contact who has an image saved as an attachment on their record and received a signed URL as expected.
Contact with attachment:
Request:
curl --request GET \
--url https://api.hubapi.com/files/v3/files/100185404582/signed-url \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN'
Response:
HTTP 200
{
"url": "https://22245342.cdnp1.hubspotusercontent-na1.net/hubfs/22245342/ABC123.png?Expires=1729879308&Signature=A_VERY_LONG_RESPONSE",
"expiresAt": "2024-10-25T18:01:48.857Z",
"name": "ABC123",
"extension": "png",
"type": "IMG",
"size": 32528,
"height": 597,
"width": 497
}
Talk soon! — Jaycee
@dipeshpatel - note that to get the file API to work (without a 404 error) on private files, you have to add extra scopes to the app token (specifically enabling uploads and attachments). The error is you see is unhelpul to say the least!
Steve
@SteveHTM Thanks for help. Yes I added same right to my Private application