Dropbox APISharing a file

Inviting a member to a shared file using the Dropbox Java library

This uses the Dropbox Java SDK to share a file at "/test.txt" with a specific user:

List<MemberSelector> newMembers = new ArrayList<MemberSelector>();
MemberSelector newMember = MemberSelector.email("<EMAIL_ADDRESS_TO_INVITE>");

List<FileMemberActionResult> fileMemberActionResults = client.sharing().addFileMember("/test.txt", newMembers);

<EMAIL_ADDRESS_TO_INVITE> should be replaced with the email address of the user to invite. Also, newMembers is an array and can contain multiple users.