# File Upload API returns 400

**URL:** <https://community.hubspot.com/t/file-upload-api-returns-400/27410>\
**Category:** APIs & Integrations\
**Tags:** cms-content, oauth\
**Created:** [October 30, 2020, 10:32am UTC](https://community.hubspot.com/t/file-upload-api-returns-400/27410 "2020-10-30T10:32:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lazar](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lazar/32/90951_2.png) [@lazar](https://community.hubspot.com/u/lazar)\
**Post date:** [October 30, 2020, 10:32am UTC](https://community.hubspot.com/t/file-upload-api-returns-400/27410/1 "2020-10-30T10:32:17Z")

</div>

I’m having trouble uploading a file to the File API. My request is authorized using an API key. Here’s the response:  
**Problem accessing /filemanager/api/v3/files/upload**

---

<div class="post-metadata">

**Author:** ![quentin\_lamamy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/quentin_lamamy/32/20212_2.png) [@quentin\_lamamy](https://community.hubspot.com/u/quentin_lamamy)\
**Post date:** [October 30, 2020, 11:21am UTC](https://community.hubspot.com/t/file-upload-api-returns-400/27410/2 "2020-10-30T11:21:15Z")

</div>

Hi @lazar Can you show us your code ?

 ![33610i7575612D979FF4F0.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/4/8/483c244e175a736fa9ea5ec82c459d8d7d5d9534.png)

---

<div class="post-metadata">

**Author:** ![lazar](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lazar/32/90951_2.png) [@lazar](https://community.hubspot.com/u/lazar)\
**Post date:** [November 1, 2020, 10:56am UTC](https://community.hubspot.com/t/file-upload-api-returns-400/27410/3 "2020-11-01T10:56:30Z")

</div>

Hey [@quentin\_lamamy](https://community.hubspot.com/t5/user/viewprofilepage/user-id/148828), I was using **fetch** on the backend, and that’s what was causing the problems. I switched to **axios** and the issue got resolved!

---

<div class="post-metadata">

**Author:** ![lazar](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lazar/32/90951_2.png) [@lazar](https://community.hubspot.com/u/lazar)\
**Post date:** [November 1, 2020, 11:07am UTC](https://community.hubspot.com/t/file-upload-api-returns-400/27410/4 "2020-11-01T11:07:49Z")

</div>

I got a different problem now. When I open the URL that’s being returned it gives me **404**.

---

<div class="post-metadata">

**Author:** ![quentin\_lamamy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/quentin_lamamy/32/20212_2.png) [@quentin\_lamamy](https://community.hubspot.com/u/quentin_lamamy)\
**Post date:** [November 1, 2020, 9:38pm UTC](https://community.hubspot.com/t/file-upload-api-returns-400/27410/5 "2020-11-01T21:38:27Z")

</div>

It’s becasue the url doesn’t exist, please post it here please

 ![33610i7575612D979FF4F0.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/4/8/483c244e175a736fa9ea5ec82c459d8d7d5d9534.png)
