How to make folders created by Managed user(s) visible for App User via Box API ?
The problem is: there is a folder, created by normal Box User (Managed user) which has several collaborators assigned. This folder contains files need to be read by API. Corresponded application is created but this folder is invisible for App User but only root folder.
Please help with this problem.
-
Just like a Managed User, the App User needs to be collaborated on the folder in order to see it.
https://docs.box.com/reference#add-a-collaboration
The app's service account should be able to create this collaboration, assuming the app has the correct scopes.
-
To add an App User as a collaborator to a folder owned by a Managed User, you need to be authenticated as the Managed User. After calling the Add a Collaboration endpoint as described, the folder would be accessible to the App User.
-
Sorry, but I'm working vith Java API, so let me clear the concepts, maybe I'm wrong in something.
Managed User is a normal BOX user which has account ID and email, working via Web interface and who can add and who can be added on folder as collaborator via Web interface.
App User is the special user to work via BOX API. He doesn't have email and cannot be added as collaborator on folder by Managed user via Web interface, cause such action require email to be entered.
Am I correct or no?
So by now via this API I can create a folder on behalf of AppUser, find Managed User and set him as folder Co-Owner programmatically. Bu I have no ideas how to add AppUser as collaborator on folder created by Managed User. It is my problem now
Thanks for patience. -
Thaks to all guys involved in the discussion.
It seems that Java API for BOX which I use (http://opensource.box.com/box-java-sdk/) is not supported yet an "As-User" functionality.
Corresponded issue had been created and still in "Open" state:
https://github.com/box/box-java-sdk/issues/76
Some useful tricks were found on StackOverflow:
http://stackoverflow.com/questions/28487936/best-way-to-get-users-folder-using-as-user-in-new-box-java-sdk
Please sign in to leave a comment.
Comments
8 comments