Skip to main content

Getting 401 Unauthorized Error from Box API

  • July 7, 2023
  • 1 reply
  • 419 views

I am using JWT app (server authentication) method for authentication and using following parameter for authentication.

  • CLIENT_ID
  • CLIENT_SECRET
  • ENTERPRISE_ID
  • PRIVATE_KEY_PASSWORD
  • PUBLIC_KEY_ID
  • PRIVATE_KEY

I am able to create folder, search folder using the APIs But while I am using https://{{upload.box.com}}/api/2.0/files/content api it is giving me 401 Unauthorized error.

Note-> Since I need to upload many files to box in loop and above API is working first time but in second time it is giving me error.

Appreciate urgent help.

1 reply

rbarbosa Box
Forum|alt.badge.img
  • Developer Advocate
  • July 7, 2023

Hi @user34 ,

Welcome to our community!

Can you elaborate your steps a bit more? The unauthorized error is throwing me off.

Also are you using the API directly (postman?, curl?) or any of our sdk’s (python?)

In the mean time see if this helps:

Let us know