cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to make sure we keep you updated on the ideas that other users have shared here on the Community? Us too! Check them out over 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: 
1
Ask
2
Comments

List Shared links in Dropbox Business Java SDK

List Shared links in Dropbox Business Java SDK

abhinovClairvoyant
New member | Level 2

How to List Shared Links in a Dropbox Business account? 

 

I am using dropbox Business (DbxTeamClientV2 client) to get all shared links but getting an error

 

DbxTeamClientV2 client = new DbxTeamClientV2(config, accessToken) // The access token was generated  for business account 
client.asAdmin(memberId).sharing().listSharedLinks().getLinks(); // fails right here

Error in call to API function "sharing/list_shared_links": This endpoint doesn't support "HTTP header \"Dropbox-API-Select-Admin\""

 

Although, it works fine in dropbox Personal account (DbxClientV2 client)

DbxClientV2 client = new DbxClientV2(config, accessToken); // The access was token generated  for personal account 
client.sharing().listSharedLinks().getLinks(); // this works
1 Accepted Solution

Accepted Solutions

Re: List Shared links in Dropbox Business Java SDK

Greg-DB
Dropboxer

@abhinovClairvoyant Здравко is correct. For that method you should use asMember​ instead of asAdmin​, as you're operating on the member account, not as an admin (whether or not the member happens to be an admin). Give that a try and let us know if you're still running in to any issues.

View solution in original post

3 Replies 3

Re: List Shared links in Dropbox Business Java SDK

Здравко
Super Collaborator | Level 20

Hi @abhinovClairvoyant,

Take a look on the listSharedLinks method description. There you can see that it lists current user' links (not very clear; 🤔 certainly can be improved) which means member' links, not admin! 😉 That's where your problem comes from - change asAdmin to asMember.

Hope this helps.

Re: List Shared links in Dropbox Business Java SDK

Greg-DB
Dropboxer

@abhinovClairvoyant Здравко is correct. For that method you should use asMember​ instead of asAdmin​, as you're operating on the member account, not as an admin (whether or not the member happens to be an admin). Give that a try and let us know if you're still running in to any issues.

Re: List Shared links in Dropbox Business Java SDK

abhinovClairvoyant
New member | Level 2

Thank you. That works !!

Who's talking

Top contributors to this post

  • User avatar
    abhinovClairvoyant New member | Level 2
  • User avatar
    Greg-DB Dropboxer
  • User avatar
    Здравко Super Collaborator | Level 20
What do Dropbox user levels mean?
Need more support?