Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

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

list_shared_links API inconsistency with team folders: Only showing edit OR view link, not both

I'm encountering an unexpected behavior with the list_shared_links API (https://api.dropboxapi.com/2/sharing/list_shared_links) when working with team folders. I hope someone can provide clarification.

Issue:

 

When listing shared links for a team folder that has both edit and view links:
1. If both edit and view links exist, only the edit link is returned in the API response.
2. If I remove the edit link manually, then only the view link is returned.

 

But, if I pass the specific path it return both links

 

Details:
- I'm using a team access token.
- I'm passing the 'Dropbox-API-Path-Root' header to list all team space shared links.

Expected behavior:
Based on the API documentation, I expected to see all shared links returned. The docs state: "If no path is given, returns a list of all shared links for the current user. For members of business teams using team space and member folders, returns all shared links in the team member's home folder unless the team space ID is specified in the request header."

 

 

Steps to reproduce:
1. Create both an edit and a view link for a team folder in Dropbox.
2. Use the list_shared_links API with a team access token and the 'Dropbox-API-Path-Root' header, without specifying a path in the body.
3. Observe that only the edit link is returned.
4. Manually remove the edit link for the folder via the Dropbox dashboard.
5. Use the list_shared_links API again with the same parameters.
6. Observe that now only the view link is returned.

 

Questions:
1. Is this the intended behavior of the API for team folders?
2. If so, is there a way to retrieve both edit and view links for team folders in a single API call without specifying the path?
3. If not, is this a known issue specific to team folders, and is there a workaround or fix planned?
4. Does this behavior differ between team folders and personal folders?

Any clarification on this would be greatly appreciated, especially regarding how the API is supposed to handle multiple link types for team folders. Thank you!

5 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 months ago

    athithan Can you try again and let me know if you're still seeing this issue now? Thanks!

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Thanks for the report! We'll look into it.

  • Здравко's avatar
    Здравко
    Legendary | Level 20
    2 years ago

    Ha.. You are correct! To be honest I didn't check this in advance and I don't use both edit and view only links together - created such for the test here. It really returns only edit links when both are available -seems like a endpoint bug. Let's hope it will be fixed.

    Good luck.

     

    @Greg-DB, you are coming here! 😉

  • athithan's avatar
    athithan
    Helpful | Level 5
    2 years ago

    You are not joking right 😉, obviously I checked all the pages, I can confirm  it. it is not returning both links together. you could check it yourself for the team account

  • Здравко's avatar
    Здравко
    Legendary | Level 20
    2 years ago

    Hm..🤔 How many times did you call /2/sharing/list_shared_links in your procedure? Hope you are aware that not all links may get returned on first call. Did you check 'has_more' in the result? Check when 'cursor' is used as param! 😉

    Hope this helps.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If 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, Facebook or Instagram.

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!