# Getting 403 status code while uploading or reading files using Api

**URL:** <https://community.hubspot.com/t/getting-403-status-code-while-uploading-or-reading-files-using-api/21014>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [May 20, 2020, 7:33am UTC](https://community.hubspot.com/t/getting-403-status-code-while-uploading-or-reading-files-using-api/21014 "2020-05-20T07:33:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bulbul](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bulbul/32/44643_2.png) [@bulbul](https://community.hubspot.com/u/bulbul)\
**Post date:** [May 20, 2020, 7:33am UTC](https://community.hubspot.com/t/getting-403-status-code-while-uploading-or-reading-files-using-api/21014/1 "2020-05-20T07:33:26Z")

</div>

Hi,

I am getting 403 status code while uploading or reading files/folders using Api. Could anybody please let me know, what are the prerequisites for file releted apis,

Thanks,

Bulbul

---

<div class="post-metadata">

**Author:** ![Willson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/willson/32/84663_2.png) [@Willson](https://community.hubspot.com/u/Willson)\
**Post date:** [May 20, 2020, 8:35am UTC](https://community.hubspot.com/t/getting-403-status-code-while-uploading-or-reading-files-using-api/21014/2 "2020-05-20T08:35:18Z")

</div>

Hey @bulbul

To confirm, this is a 403 Forbidden error. This is returned when the authentication provided does not have the proper permissions to access the specific URL.

As an example, an OAuth token that only has content access would get a 403 when accessing the Deals API (which requires contacts access). In this case, the OAuth token or API key being used does not have the proper access to the endpoint you’re attempting to hit.

Could you confirm which endpoint you’re hitting and which method of authentication you’re using? Thanks!

---

<div class="post-metadata">

**Author:** ![bulbul](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bulbul/32/44643_2.png) [@bulbul](https://community.hubspot.com/u/bulbul)\
**Post date:** [May 20, 2020, 10:10am UTC](https://community.hubspot.com/t/getting-403-status-code-while-uploading-or-reading-files-using-api/21014/3 "2020-05-20T10:10:54Z")

</div>

Thank You Very much for the reply.

I am using OAuth token and hitting following api : POST /filemanager/api/v2/files.

Please let me know from where I can grant the required permission

---

<div class="post-metadata">

**Author:** ![bulbul](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bulbul/32/44643_2.png) [@bulbul](https://community.hubspot.com/u/bulbul)\
**Post date:** [June 16, 2020, 6:18am UTC](https://community.hubspot.com/t/getting-403-status-code-while-uploading-or-reading-files-using-api/21014/4 "2020-06-16T06:18:34Z")

</div>

I was missing ‘file’ scope, thank you for the reply
