cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right 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: 

Unable to get shared link information in LinkPermissions in Java SDK

Unable to get shared link information in LinkPermissions in Java SDK

abhinovClairvoyant2
Helpful | Level 5

I have shared some files in Dropbox Business.

I am using Dropbox Java SDK to get shared link information using  SharedLinkMetadata -> LinkPermissions . 

 

I want to get the LinkAudience of a shared file link (public, team, password_protected, invited etc) AND its AccessLevel (viewer or editor) which are present inside LinkPermissions.

 

But Dropbox API is returning null values for those. 

I am using dropbox-core-sdk v5.4.4. Also, have enabled all permissions in dropbox App settings as well. 

Screenshot from 2023-03-13 12-56-23.png

 

Please help me. 

Thanks a Lot !! 

3 Replies 3

Greg-DB
Dropbox Staff

Those fields are optional, and are not returned for all cases, depending on the type of link, etc. For instance, in this case, the API returns 'resolvedVisibility' as "NO_ONE", indicating that the link itself only refers to the content, and does not grant any additional access to it.

 

These properties are based on the link, not the app's settings, so enabling scopes for the app won't affect this. Scopes only determine which API endpoints the app is allowed to use.

abhinovClairvoyant2
Helpful | Level 5

Yes those fields are optional and may not be returned for all cases.

But I still need to get those information - link audience and access level.

 

How do I get this information - with whom I have shared that file and what can they do with the link.

I am sure I have shared files in my dropbox. 

Greg-DB
Dropbox Staff

There isn't a way to force the API to fill in those fields. They will only be filled in based on the link. For instance, in the example you posted, you should rely on the 'resolvedVisibility' field, where the 'NO_ONE' indicates that there is no actual access granted by the link itself. You can find more information on these fields in the documentation, such as for the /2/sharing/list_shared_links endpoint (click through SharedLinkMetadata, FileLinkMetadata or FolderLinkMetadata, and LinkPermissions). The same is available in the Java SDK documentation, e.g., for ListSharedLinksResult.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    abhinovClairvoyant2 Helpful | Level 5
What do Dropbox user levels mean?