# Downloading a File via API call

**URL:** <https://community.easymorph.com/t/downloading-a-file-via-api-call/6225>\
**Category:** General Q&A\
**Created:** [June 30, 2025, 2:15pm UTC](https://community.easymorph.com/t/downloading-a-file-via-api-call/6225 "2025-06-30T14:15:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaden](https://community.easymorph.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@Jaden](https://community.easymorph.com/u/Jaden)\
**Post date:** [June 30, 2025, 2:15pm UTC](https://community.easymorph.com/t/downloading-a-file-via-api-call/6225/1 "2025-06-30T14:15:11Z")

</div>

Hi,

We are trying to download a file by giving it the fully qualified path name. Using the API we set up we can only seem to download files from the Default/Public Space folder path that's on our EasyMorph host. (That is where our project for the endpoint is located) When we try to do it to any other location it doesn't seem to work. Is the API limited to only files on the EasyMorph host we have set up?

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [June 30, 2025, 9:46pm UTC](https://community.easymorph.com/t/downloading-a-file-via-api-call/6225/2 "2025-06-30T21:46:23Z")

</div>

> [@Jaden](#):
>
> When we try to do it to any other location it doesn't seem to work.

From what location do you want the files to be served? For security reasons, the API server restricts the ability to download files from elsewhere. If you still need to provide a file from somewhere else, the workflow that processes the API calls can copy it to a temporary folder inside the public folder, and then make it downloadable from there. Don't forget to clean up the temporary folder.

---

<div class="post-metadata">

**Author:** ![Jaden](https://community.easymorph.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@Jaden](https://community.easymorph.com/u/Jaden)\
**Post date:** [July 1, 2025, 8:01pm UTC](https://community.easymorph.com/t/downloading-a-file-via-api-call/6225/3 "2025-07-01T20:01:40Z")

</div>

Thank you, this is helpful to know. We will try to use the temporary location to see if that works. We are trying to download a file from a file share.

---

<div class="post-metadata">

**Author:** ![ckononenko](https://community.easymorph.com/user_avatar/community.easymorph.com/ckononenko/32/7044_2.png) [@ckononenko](https://community.easymorph.com/u/ckononenko)\
**Post date:** [July 1, 2025, 8:35pm UTC](https://community.easymorph.com/t/downloading-a-file-via-api-call/6225/4 "2025-07-01T20:35:32Z")

</div>

Another option is to use the [Custom API Server](https://community.easymorph.com/t/announcement-custom-api-server/3818).  
You can configure the Custom API endpoint to return a file download by adding a **Construct HTTP Response** step to the endpoint’s workflow.

 ![image](https://community.easymorph.com/uploads/default/original/2X/5/52cd410135e133933e4fc1901971190a888fbd29.png)
