We have issue where we want to get all the collaborators for file, however, we are not getting all the collaborators. If I call list folder collaboration Api, I am getting all the collaborators whoever have access to that file. If it is waterfall permission model, I should have all the collaborations from the file endpoint, if that file under the parent folder.
So why I am not getting all the collaborators when I use list file collaboration API?
ref: - List file collaborations - API Reference - Box Developer Documentation
This is probably due to the endpoint only returning users explicitly collaborated at that content level. For example, let’s say someone is collabed via group or at a higher level in the tree - the endpoint doesn’t return an exhaustive list of all collaborators in that have access. You’d have to go up the folder tree. Does that make sense?
Alex, Box Developer Advocate
Thanks for your reply. What best practice should I adopt from the below options? What will happen if the folder is 9 level deep and need all the collaborators?
- Use File owner token to fetch all the collaborations
- use repetitive call to folder collaborations
Sorry for the delay. I was out for the holidays!
I’m not sure I quite understand the two options you listed, but you would need to make repetitive calls up the file tree using an access token created by an application or user that has access to the content throughout the entire tree - the file owner would work in this case.
If a piece of content is far down in the tree, you have to keep going up. As previously mentioned, the API endpoint isn’t exhaustive in the collaboration list, especially pertaining to the groups piece.
Thank you for your input.