Learn how to make the most out of the Dropbox Community here 💙. 

Forum Discussion

sanchitcop1997's avatar
sanchitcop1997
New member | Level 1
2 months ago

List all files recursively inside a shared folder using the dropbox node sdk

Hi, trying to list all files recursively inside a folder shared with my account by another account through the Node SDK. The folder is inside Shared -> Folders. 

Tried the following methods but none of them give me a list of files:

  • sharingListFolders (just returns the folder object)

  • sharingListSharedLinks

  • sharingGetSharedLinkMetadata

  • sharingListReceivedFiles

  • sharingListMountableFolders

 

Is there a method that does what I want?

  • sanchitcop1997's avatar
    sanchitcop1997
    New member | Level 1

    Looks like filesListFolder does work if I specify the path for the shared folder, but it doesn't seem to like the recursive parameter. Any reason I cannot list files for a shared folder recursively but I can for my own folder?

    I get a list of folders and files inside the shared folder if I don't pass in recursive, but I only get the shared folder object if I do. I wanted a flat list of all files inside the shared folder

    • DB-Des's avatar
      DB-Des
      Icon for Dropbox Engineer rankDropbox Engineer

      Hi sanchitcop1997,

      Could you confirm whether the property "has_more" in the response has a value of "true"? If so, you will need to retrieve the "cursor" value from the response to then call filesListFolderContinue({ cursor: cursor }), with the value of that "cursor" property.

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers810 PostsLatest Activity: 6 hours ago
228 Following

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 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!