We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
skaros
9 years agoHelpful | Level 6
add members to a file/folder
Hi, I am using the dropbox-sdk-java, via Maven, and i unable to find a way to add members to a file(and later to a folder). Could you provide with some pointers? I think i have to use DbxRawClien...
- 9 years ago
You don't need to use DbxRawClientV2. You should instead use DbxClientV2, as shown in the examples, e.g., here.
Calling addFileMember would look like this:
DbxRequestConfig config = new DbxRequestConfig("example"); DbxClientV2 client = new DbxClientV2(config, ACCESS_TOKEN); List<MemberSelector> newMembers = new ArrayList<MemberSelector>(); MemberSelector newMember = MemberSelector.email("dbapitesting@gmail.com"); newMembers.add(newMember); List<FileMemberActionResult> fileMemberActionResults = client.sharing().addFileMember("/test.txt", newMembers); System.out.print(fileMemberActionResults);
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!