We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
abhinovClairvoyant
2 years agoNew member | Level 2
List Shared links in Dropbox Business Java SDK
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
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.
- ЗдравкоLegendary | Level 20
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.
- abhinovClairvoyantNew member | Level 2
Thank you. That works !!
- Greg-DBDropbox Staff
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.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!