Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
iam using the code below in a java desktop application, in order to create a folder in a dropbox account that i want to be shared, and i am trying to add another member by his email address, but iam getting:
java.lang.NoSuchMethodError: com.dropbox.core.json.JsonWriter.writeFields(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;)V
at com.dropbox.core.v2.DbxFiles$CreateFolderArg$1.write(DbxFiles.java:5337)
at com.dropbox.core.v2.DbxFiles$CreateFolderArg$1.write(DbxFiles.java:5332)
at com.dropbox.core.json.JsonWriter.writeToStream(JsonWriter.java:23)
at com.dropbox.core.json.JsonWriter.writeToStream(JsonWriter.java:33)
at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:82)
at com.dropbox.core.v2.DbxFiles.createFolder(DbxFiles.java:8459)
at com.dropbox.core.v2.DbxFiles.createFolder(DbxFiles.java:8479)
my code is the following:
DbxRequestConfig dbxRequestConfig = new DbxRequestConfig("test/1.0", Locale.getDefault().toString());
DbxClientV2 dbxClient = new DbxClientV2(dbxRequestConfig, my_access_token);
FolderMetadata md = dbxClient.files.createFolder("/test");
ArrayList<AddMember> list = new ArrayList();
DbxSharing.AddMember a1 = new DbxSharing.AddMember(DbxSharing.MemberSelector.email("xxxxxx@gmail.com"),DbxSharing.AccessLevel.editor);
list.add(a1);
dbxClient.sharing.addFolderMember(md.parentSharedFolderId, list);
i have already search for any solution to create a shared folder and add a member to it, but iam not finding anything useful to my case.
Could anyone tell me what iam doing wrong??please help me ASAP.
i gave the final solution to my problem. My working code is:
ArrayList<DbxSharing.AddMember> list = new ArrayList<DbxSharing.AddMember>();
DbxSharing.AddMember a1 = new DbxSharing.AddMember(DbxSharing.MemberSelector.email("xxxxx@gmail.com"), DbxSharing.AccessLevel.editor);
list.add(a1);
ShareFolderLaunch l = dbxClient.sharing.shareFolder("/test");
SharedFolderMetadata md2 = l.getComplete();
dbxClient.sharing.addFolderMember(md2.sharedFolderId,list);
What if I want to add a member to already shared folder??
Suryakant, you can use the addFolderMember method to add members to already shared folders.
@Gregory. Thanks for your reply. Actually I have shared the folder. Added a member to it. Now I want to get and accept the invitation request programtically
You can use the mountFolder method to mount the shared folder in the invited user's account, as long as that user has authorized the app on their account as well.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
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!