cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get Shared Folder ID for a shared folder in java using dropbox sdk.

How to get Shared Folder ID for a shared folder in java using dropbox sdk.

Reshma
Explorer | Level 3
Go to solution

How to get Shared Folder ID for a shared folder in java using dropbox sdk. 

 

I'm using the below method to share a folder. But this is returning ShareFolderLaunch. But I want to share a folder and get SharedFolderMetadata . If not shareFolder() method is there any other method which returns SharedFolderMetadata ??

ShareFolderLaunch data = client.sharing().shareFolder("/TestShareFolder/");

 

I wanted to share a folder and get the value of SharedFolderID from SharedFolderMetadata class , something like SharedFolderMetadata.getSharedFolderId().

 

Could you please suggest me what action or which methods returns me SharedFolderMetadata.getSharedFolderId()

 

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

If ShareFolderLaunch.isAsyncJobId from shareFolder is true, you should then poll checkShareJobStatus using the job ID from ShareFolderLaunch.getAsyncJobIdValue to check on the status of that share job. That will give you a ShareFolderJobStatus you can check to see the current status. When it's complete, you can get the SharedFolderMetadata from ShareFolderJobStatus.getCompleteValue.

 

For existing shared folders, check out DbxUserFilesRequests.getMetadata and DbxUserSharingRequests.getFolderMetadata.

 

Refer to the linked documentation pages for more information.

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

If ShareFolderLaunch.isAsyncJobId from shareFolder is true, you should then poll checkShareJobStatus using the job ID from ShareFolderLaunch.getAsyncJobIdValue to check on the status of that share job. That will give you a ShareFolderJobStatus you can check to see the current status. When it's complete, you can get the SharedFolderMetadata from ShareFolderJobStatus.getCompleteValue.

 

For existing shared folders, check out DbxUserFilesRequests.getMetadata and DbxUserSharingRequests.getFolderMetadata.

 

Refer to the linked documentation pages for more information.

Reshma
Explorer | Level 3
Go to solution

@Greg-DB  Thanks . This helps.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Reshma Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?