# Upload File API error: no "files" permission

**URL:** <https://community.hubspot.com/t/upload-file-api-error-no-files-permission/73722>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [January 25, 2023, 3:45pm UTC](https://community.hubspot.com/t/upload-file-api-error-no-files-permission/73722 "2023-01-25T15:45:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PJMuller](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pjmuller/32/38459_2.png) [@PJMuller](https://community.hubspot.com/u/PJMuller)\
**Post date:** [January 25, 2023, 3:45pm UTC](https://community.hubspot.com/t/upload-file-api-error-no-files-permission/73722/1 "2023-01-25T15:45:19Z")

</div>

Hi,

I’m trying to upload a file via /files/v3/files API method and I’m getting error

` {"status":"error","message":"This app hasn't been granted all required scopes to make this call. Read more about required scopes here: https://developers.hubspot.com/scopes.","correlationId":"54643f16-bbc5-4af1-9571-a93911eee531","errors":[{"message":"All of the following scopes are required.","context":{"requiredScopes":["files"]}}],"links":{"scopes":"https://developers.hubspot.com/scopes"},"category":"MISSING_SCOPES"}`

I doublechecked that my API token has needed “files” scope via another API method [https://api.hubapi.com/oauth/v1/access-tokens/:accessToken](https://api.hubapi.com/oauth/v1/access-tokens/:accessToken)

```lia-code-sample
{
 ...
 "scopes": [
 "content",
 "automation",
 "oauth",
 "forms",
 "files",
 "tickets",
 "e-commerce",
 "crm.lists.read",
 "crm.objects.contacts.read",
 "crm.objects.contacts.write",
 "files.ui_hidden.read",
 "crm.objects.companies.write",
 "crm.schemas.contacts.read",
 "crm.lists.write",
 "crm.objects.companies.read",
 "crm.objects.deals.read",
 "crm.objects.deals.write",
 "crm.schemas.companies.read",
 "crm.schemas.companies.write",
 "crm.schemas.contacts.write",
 "crm.schemas.deals.read",
 "crm.schemas.deals.write",
 "crm.objects.owners.read"
 ],
 ...
}

```

During oAuth request I’m requesting “files” (within several other scopes) scope as required scope.

---

<div class="post-metadata">

**Author:** ![tominal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tominal/32/73018_2.png) [@tominal](https://community.hubspot.com/u/tominal)\
**Post date:** [January 25, 2023, 6:56pm UTC](https://community.hubspot.com/t/upload-file-api-error-no-files-permission/73722/2 "2023-01-25T18:56:09Z")

</div>

Hey @PJMuller

That error is related to how your developer app is set up. When you navigate to your developer app and then go to the **Auth** tab, I suspect your app is missing the **files** scope. If you have recently added files functionality into your app, I would re-authenticate the app with your HubSpot portal.

 ![tominal_0-1674672953755.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/f/5f27a261f0771eeb50061a002b5fa91d0788709f.png)

Hope that helps!

---

<div class="post-metadata">

**Author:** ![PJMuller](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pjmuller/32/38459_2.png) [@PJMuller](https://community.hubspot.com/u/PJMuller)\
**Post date:** [January 26, 2023, 9:47am UTC](https://community.hubspot.com/t/upload-file-api-error-no-files-permission/73722/3 "2023-01-26T09:47:59Z")

</div>

Hi, @tominal  
Thank you for your reply.

How should I re-authenticate the app with HubSpot portal? After adding new scope to app config, I just follow the regular oAuth flow with a user account and obtain a new access token. Do I need to do anything special right after adding new scope to the app config?

---

<div class="post-metadata">

**Author:** ![tominal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tominal/32/73018_2.png) [@tominal](https://community.hubspot.com/u/tominal)\
**Post date:** [January 26, 2023, 6:27pm UTC](https://community.hubspot.com/t/upload-file-api-error-no-files-permission/73722/4 "2023-01-26T18:27:58Z")

</div>

That sounds right to me! If you’re still experiencing issues after that, I would uninstall the developer app from the HubSpot portal and re-authorize it.
