We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

abhinovClairvoyant2's avatar
abhinovClairvoyant2
Helpful | Level 5
2 years ago

Dropbox Java SDK List Shared Links of a Team Folder in Business Account

I am trying to access all shared links in dropbox business account (team folder) using Java SDK.

 

I am able to get shared Link Metadatas for files inside personal space of a particular member of the team - 

List<SharedLinkMetadata> sharedLinkMetadataList = client.asMember(memberId).sharing().listSharedLinks().getLinks(); 

But, this does not return the shared links of the team folder and files within the teamspace.  How can I list the shared links of all files and folders within the team folder? Using client.asAdmin() does not work 

client.asAdmin(memberId).sharing().listSharedLinks().getLinks()

 

For reference, I am NOT able to get shared links inside teamSpace folder

    • abhinovClairvoyant2's avatar
      abhinovClairvoyant2
      Helpful | Level 5

      Thank you. 😀

      After setting the root namespace it works

       

      String rootNS =
      client.asAdmin(memberId).users().getCurrentAccount().getRootInfo().getRootNamespaceId();

      List<SharedLinkMetadata> sharedLinkMetadataList = client
      .asMember(memberId)
      .withPathRoot(PathRoot.namespaceId(rootNS))
      .sharing()
      .listSharedLinks()
      .getLinks();