Forum Discussion

ClicData's avatar
ClicData
New member | Level 2
3 years ago

Not able to fetch shared folder when folder are shared with team

Hi,

Useful informations

- Using VB.Net with Dropbox.API SDK 6.37

The problem
Using the methods ListFolderAsync and ListFolderContinueAsync, I'm unable to fetch shared folders when folders are shared with a team you are part of, but you are able to retrieve folders when they are directly shared with you.


Am I doing something wrong, and the method ListFolderAsync() is not made to retrieve folders shared with teams ?

3 Replies

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

    Hi ClicData,

    First af all, the method ListFolderAsync is not to list shared folders especially. This method is used to list content of a folder. It can list all entries directly residing in the pointed folder or recursively all nested content. In all cases if there is something shared (either file or folder) it will be listed too. If you want to list only shared folders, better use ListFoldersAsync method. You might get confused by difference in account root and API root - they are in general different things that can coincide. By default API root is set to your user folder, for account with team space, not to the account root! If desirable, you may need to change this, otherwise you stay limited to your user folder only. Use WithPathRoot method to do that.

    Hope this gives direction.

  • ClicDataConnectors's avatar
    ClicDataConnectors
    Explorer | Level 3
    3 years ago

    Hi,

     

    Thank you for your answer.

    It's actually already the logic we use. The thing is, we test the FullAccount.RootInfo.IsTeam property, and in this case we use WithPathRoot(<RootNameSpaceId>).

     

    We didn't change anything in the code, this property returned true before that's why we could fetch team folders. Now that it returns false, I wonder if any change was made to the API that I should be aware of.

    Thank you for your help

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

    ClicDataConnectors You don't actually need to check the RootInfo.IsTeam property; you can always use WithPathRoot to access the root for any kind of account. I recommend reading the Team Files Guide for more information.

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!