# Fetch attachment file content

**URL:** <https://community.hubspot.com/t/fetch-attachment-file-content/119092>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [October 24, 2024, 12:25pm UTC](https://community.hubspot.com/t/fetch-attachment-file-content/119092 "2024-10-24T12:25:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dipeshpatel](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dipeshpatel/32/48564_2.png) [@dipeshpatel](https://community.hubspot.com/u/dipeshpatel)\
**Post date:** [October 24, 2024, 12:25pm UTC](https://community.hubspot.com/t/fetch-attachment-file-content/119092/1 "2024-10-24T12:25:43Z")

</div>

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](https://developers.hubspot.com/docs/api/files/files)

GET/files/v3/files/{fileId}

 ![dipeshpatel_0-1729772710317.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/b/bca0ae1cc7d5a574adbca23473989fc131daf4a6.png)

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [October 24, 2024, 6:09pm UTC](https://community.hubspot.com/t/fetch-attachment-file-content/119092/2 "2024-10-24T18:09:08Z")

</div>

Hey, @dipeshpatel👋 Quick question — will it work when you test from the [**endpoint page**](https://developers.hubspot.com/docs/api/files/files) 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:

 ![CleanShot 2024-10-24 at 12.06.52@2x.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/3/32c1e45dbc6b37e1c8b3aaf6424f35e724ae44af.png)

Request:

```lia-code-sample
curl --request GET \
 --url https://api.hubapi.com/files/v3/files/100185404582/signed-url \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

```

Response:

```lia-code-sample
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

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [October 24, 2024, 10:33pm UTC](https://community.hubspot.com/t/fetch-attachment-file-content/119092/3 "2024-10-24T22:33:41Z")

</div>

@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!

 ![SteveHTM_0-1729809185729.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/4/d/4ddf86871357c7f7ef8eb94f7b8f47c88c448186.png)

Steve

---

<div class="post-metadata">

**Author:** ![dipeshpatel](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dipeshpatel/32/48564_2.png) [@dipeshpatel](https://community.hubspot.com/u/dipeshpatel)\
**Post date:** [October 25, 2024, 6:17am UTC](https://community.hubspot.com/t/fetch-attachment-file-content/119092/4 "2024-10-25T06:17:04Z")

</div>

@SteveHTM Thanks for help. Yes I added same right to my Private application
