Skip to main content
Question

File Upload Using JWT

  • May 22, 2025
  • 3 replies
  • 30 views

Forum|alt.badge.img

I am able to almost all of the existing API with JWT token. But when i try to upload a file using JWT, i am getting acess_Denied error. Am i doing some thing wrong?

{"type":"error","status":403,"code":"access_denied_insufficient_permissions","help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Access denied - insufficient permission","request_id":"bnrn8fg5ii91ykbm"}

 

2. Is my assumption true, that we can replace the OAUTH token with JWT and all the API will work as is if all the required permissions are provided for the app and applied to all users? 

 

 

3 replies

Forum|alt.badge.img

Hi ,

 

Typically this is related to the scoped that you've selected on your application. If you:

  • Go to the developer console
  • Click on your application 
  • From the left nav click on "Configuration"
  • Scroll down to the scopes section

For uploading a file you'll need to select "Read and Write all files and folders stored in Box" selected. 

 

Lastly, the difference between an OAuth and JWT based app is that your admin will need to authorize your application to work in the enterprise, otherwise you might potentially get these issues. Follow these directions to do that. Every time you make changes to your app the admin will need to reauthorize the app to allow them to take effect.

 

Let me know if that helps, otherwise we can dig in further.

 

Thanks,

Jon


Forum|alt.badge.img

Thank you Jon for the quick response. But "Read and Write all files and folders stored in Box" Application Scope is already enabled. And this app is applied to "All Users" in Admin Console

 

I am able to move and delete files but not able to upload file to the folder

 

 


Forum|alt.badge.img

Please ignore this, i have a typo in the one of the header field