Context:
- We are actively builidng a Box Integration.
- Developed a
custom-application
to use Authentication asOAuth2.0
, Created a web-integration to “Process the File” - We use the
Auth-Code
received from Web-Integration to get the DownloadURL for the file. - We are not storing each user’s access-token in our database. Instead, we are authorising Admin/Co-Admin and store’s his/her AccessToken/Refresh Token.
- After Processing the file-content asynchronously, we need to upload a new version of the file later.
- We are using the Admin/Co-Admin access-token stored in our database to initialize the Node-SDK and upload the file version.
Problem:
When we try to Upload the file, We started getting error - “404 Not Found”
After some reading, We understood the issue is because we are using a different user’s token. and Tried the “AS-USER” header to solve this problem.
Unfortunately the new Request throws “403Forbidden”
Why the “as-user” header is not working for us?
Note:
- I have enabled the use “as-user” option in app settings.
- Also enabled “manage-users” permission in app settings.
Thanks, Sarin