cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you new to Dropbox? Our Newcomers group is the perfect place to learn the basics, find out 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: 

Re: List Shared links in Dropbox Business Java SDK

List Shared links in Dropbox Business Java SDK

abhinovClairvoyant
New member | Level 2
Go to solution

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

Greg-DB
Dropbox Staff
Go to solution

@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

Здравко
Legendary | Level 20
Go to solution

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.

Greg-DB
Dropbox Staff
Go to solution

@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.

abhinovClairvoyant
New member | Level 2
Go to solution

Thank you. That works !!

Need more support?