You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
alreeves27
8 years agoExplorer | Level 3
Path to files and folders in a Team Folder
I am using the API v2 endpoints to query a user's dropbox account for their folder structure to allow the user to select a folder. We are offering a service to be able to import files dropped in that folder into our document managment system.
Everything works with folders and files in the user's account however I'm stuck with the interface to Team Folders when a Dropbox for Business account is used. I am still using the user end points and not the business end points. I can get the list of team shares but when I query the contents of the shares using list_folders endpoint, the files and subfolders metadata all have an empty path lower. So I am not sure how I then proceed to retrieve the contents of the subfolder or even retrieve the file as I don't know what path/url to use. I can't even get/create a shareable link without a path/url.
I'm not sure what I am missing here and hope someone can get me over the hump.
I am using the .Net API if that matters.
- Greg-DBDropbox Staff
If the PathLower is missing, that should indicate that the folder isn't "mounted" in that user's account. (E.g., they have access to it, but haven't added it to their account.)
Are you sure you're looking at the entry for the actual team folder you're looking for? Some accounts may have old/unmounted shared/team folders. Make sure you use both SharingUserRoutes.ListFoldersAsync and SharingUserRoutes.ListFoldersContinueAsync to page through the results if necessary to get everything.
You can also use FilesUserRoutes.ListFolderAsync and FilesUserRoutes.ListFolderContinueAsync to get the actual file/folder listing.
- alreeves27Explorer | Level 3
Greg,
Thank you for the quick reply.
I'm not sure how to mount a team Folder to my account.
Here is my list of team folders in the Admin Console:
My account has the folders listed. Are they still not mounted?
I am using the ListFoldersAsync and can get the Share and it's URL:
The problem is I am then using Files.ListFolderAsync (using the previewUrl value) to get the contents of the shared folder and I don't see anything in the metadata for the subfolder that I can use to reference that folder (url or path) to then call ListFolderAsync on the subfolder to get its contents. I tried passing in the "id:" value as the path as documentation for list_folder appears to allow that also (
path
 String(pattern="(/(.|[\r\n])*)?|id:.*|(ns:[0-9]+(/.*)?)") A unique identifier for the file. ) But I get error path not found.- alreeves27Explorer | Level 3
I was able to get the contents of the subfolder in a share if I passed in the link to the share and the path where I set the path as "/<foldername>". I tried passing in the id as path and along with the share url and it didn't work.
I'm going to see if I can list then subsequently retrieve the files in the subfolder with a similiar approach.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days 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!