# Link properties from an attachment are broken

**URL:** <https://community.hubspot.com/t/link-properties-from-an-attachment-are-broken/17019>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [November 1, 2019, 5:12pm UTC](https://community.hubspot.com/t/link-properties-from-an-attachment-are-broken/17019 "2019-11-01T17:12:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mathcee](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mathcee/32/33450_2.png) [@mathcee](https://community.hubspot.com/u/mathcee)\
**Post date:** [November 1, 2019, 5:12pm UTC](https://community.hubspot.com/t/link-properties-from-an-attachment-are-broken/17019/1 "2019-11-01T17:12:44Z")

</div>

I’m using the engagements endpoint, and the attachment information to hit the filemanager endpoint for files and getting the file attachments for a given deal.  
I’ve seen 3 different properties with urls that seems to be for that attached file, but, to my surprise, all those links fail. 2 of them fail with a 404, and one of them fails with a 403.  
My question is, is there no way I can download those files via API? Or choose to publicly expose them? Also, what is the point of the url properties I mentioned?  
Thanks

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [November 4, 2019, 10:16pm UTC](https://community.hubspot.com/t/link-properties-from-an-attachment-are-broken/17019/2 "2019-11-04T22:16:23Z")

</div>

Hi, @mathcee.

I reponded to [your original post](https://community.hubspot.com/t5/APIs-Integrations/Get-attachments-on-a-company-contact-or-deal/m-p/300053#M28204) a little earlier, but I’m happy to continue the discussion here.

Can you confirm that your Hub ID ends with **7645** and then share the following?

1. The ID of a CRM object you are pulling engagements from (contact, company, deal, or ticket).
2. The ID of an engagement on the above object which has file IDs in the `attachments` array you are interested in.
3. The IDs of the attachments you are trying to access.

Also, which URL properties are you trying? If you’re using [this endpoint](https://developers.hubspot.com/docs/methods/files/get_files_file_id) and the file is publicly accessible, the `url` field is the one to use.

---

<div class="post-metadata">

**Author:** ![mathcee](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mathcee/32/33450_2.png) [@mathcee](https://community.hubspot.com/u/mathcee)\
**Post date:** [November 7, 2019, 8:36pm UTC](https://community.hubspot.com/t/link-properties-from-an-attachment-are-broken/17019/3 "2019-11-07T20:36:58Z")

</div>

Confirmed. That is indeed the end to my Hub ID.  
Deal ID: 374693036  
Engagement ID: 3815773955  
Attachment ID: 19892487693

---

<div class="post-metadata">

**Author:** ![mathcee](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mathcee/32/33450_2.png) [@mathcee](https://community.hubspot.com/u/mathcee)\
**Post date:** [November 19, 2019, 7:38pm UTC](https://community.hubspot.com/t/link-properties-from-an-attachment-are-broken/17019/4 "2019-11-19T19:38:30Z")

</div>

@IsaacTakushi Any news regardind this issue Isaac? Thank you

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [November 25, 2019, 2:38pm UTC](https://community.hubspot.com/t/link-properties-from-an-attachment-are-broken/17019/5 "2019-11-25T14:38:51Z")

</div>

Hi, @mathcee.

Sincere apologies for the delayed response. For some reason, your response was filtered from my inbox.

Thank you for sharing that information. I found the file you referenced and replicated the behavior you’ve described.

File **19892487693** is `"hidden": true`, which prevents it from being accessed at public file URLs like [https://cdn2.hubspot.net/hubfs/…7645/Your-file.pdf](https://cdn2.hubspot.net/hubfs/3957645/Teste%20de%20novos%20snipptes2-1-1.pdf).  
Per Derek’s first response to [this Community post](https://community.hubspot.com/t5/APIs-Integrations/What-decides-if-a-COS-file-is-hidden-or-not-If-uploaded-to-CRM/m-p/226917) as well as @SwivelDev’s response to [this other Community post](https://community.hubspot.com/t5/APIs-Integrations/Download-deal-attachement/m-p/272854/thread-id/24778#M24802), files which are uploaded externally directly to a deal or contact will be hidden by default.

At this time, it is not possible to change a file from `"hidden": true` to `"hidden": false`, or vice versa, as indicated in [this article](https://developers.hubspot.com/docs/methods/files/post_files). I am sorry if this comes as an unwelcome surprise.

One way to prevent files from being hidden is to upload them to HubSpot’s file manager _before_ attaching them to an engagement. See [this screencast](https://recordit.co/NyIj25JfcF).
