Basic question about app / managed user
Hello, I am developing a web app with box as storage for a enterprise. I am having some problem with some basic understanding:
- User uploads a file to the web app, which in turn uploaded to box via EnterpriseAPI
- User has managed account by the enterprise and desktop sync installed.
- How can user see the file he uploaded to the web app in desktop sync? (Add this user's managed account to the app's root folder?)
- How can user drag a file into desktop sync folder and make it appear in the web app? (Via stream or webhook?)
Many thanks
Follow up, when I try to add a managed user as a collaborator, it failed with this error message
{"type":"error","status":403,"code":"access_denied_insufficient_permissions","help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Access denied - insufficient permission","request_id":"***number removed for privacy***359f404444f80c"}
My code is like this
BoxAPIConnection api = utils.getEnterpriseBoxAPI(); BoxFolder root = BoxFolder.getRootFolder(api); Iterable users = BoxUser.getAllEnterpriseUsers(api); users.forEach(user -> { BoxCollaborator user1 = new BoxUser(api, user.getID()); root.collaborate(user1, BoxCollaboration.Role.VIEWER_UPLOADER); });
-
Hello ,
at the end the only thing you need to have in mind is to use the same folder. Desktop sync only synchronizes folders selected by the user.
What does your app do? Are you working with the managed users authorizing the application with OAUTH? or are you working with app users with JWT? If the option is the former, should work by default as you will be showing all the users folders. If the answer is the latter, then you have to have a folder where your app user and the managed user are both collaborators and the documents are sync and showed.
About the error... is your application granted with manage users permissions? You've created the app, then shared your clientid with BOX admin instance you want to use, and it has been authorized... does it have the rights needed?
Regards
-
My app is an internal management tool, allow user to upload/download files. Each user has their enterprise box account.
App is authorizing through JWT. I was able to successfully shared the folder to users by adding them as collaborators. But I noticed I have to give them EDITOR permission to allow them sync to desktop?
-
Hi ,
I can speak to the last part and say that editor permission is required for a user to sync any document to the desktop.
Please sign in to leave a comment.
Comments
3 comments