I am using the python sdk to try to automate uploading a large batch of files to Box. I have created an app in the developer console and authorized my script with the JWT authorization. I want to upload files directly to a folder in my box drive so I tried to use the as-user heading as it is described in the docs. I have authorized my app as the enterprise admin, and I have checked to make sure the app has permission to edit files and make calls as the user. I am still getting the error.
Here is the authorization code I used:
from boxsdk import Client, JWTAuth
auth = JWTAuth.from_settings_file('config.json')
client = Client(auth)
current_user = client.user().get()
user_to_impersonate = client.user(str(current_user.id))
user_client = client.as_user(user_to_impersonate)
user_client.folder("0").get() #this creates the error
BoxAPIException: Message: Access denied - insufficient permission Status: 403 Code: access_denied_insufficient_permissions Request ID: erx3qrh6t3wjj52i
Please sign in to leave a comment.