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
KarenCu
4 years agoExplorer | Level 4
Dropbox API's Files.ListFolderAsync return path not found
hi everyone,
We have dropbox's enterprise account and a team admin to grant consent permission to DropBox's Enterprise application.
In this dropbox's enterprise, we have a team folder "Design Document" created by different account which assigns to a group "Design". However, the authorized team admin user above isn't in the group of Design.
When we use Dropbox API's Files.ListFolderAsync to find the changes of this team folder "Design Document". The error returns path not found. In addition, I tried with header "Dropbox-Api-Select-Admin" and pass in the team admin's team_member_id and still not found.
When we connect using https://api.dropboxapi.com/2/team/team_folder/list with the same Dropbox Token, this team folder "Design Document" was listed.
So why we got the path not found even though the folder was there? Team admin should be able to see all the folders even though he is not in the member list?
Please note the app to consent to Dropbox is Business's account .
Thanks so much for your assistant.
Regards,
Karen
You can make this call like this:
Feature feature = Feature.HasTeamSharedDropbox.Instance; FeaturesGetValuesBatchArg featuresGetValuesBatchArg = new FeaturesGetValuesBatchArg(new List<Feature> { feature }); FeaturesGetValuesBatchResult featuresGetValuesBatchResult = await client.Team.FeaturesGetValuesAsync(featuresGetValuesBatchArg);
Hope this helps!
- Greg-DBDropbox Staff
When calling it with a particular path like "/Design Document", the ListFolderAsync method will only find items mounted in the connected account (for user-linked apps) or the specified team member's account (for team-linked apps, such as when using the DropboxTeamClientAsMember or DropboxTeamClient.AsAdmin method to specify the particular member).
Additionally, if the team uses the "team space" configuration, and the folder is in the team space, the API call needs to be configured with the team space as the root. (API calls default to the member folder, not the team space.)
If you haven't already, I recommend first reading the File Access Guide and Team Files Guide as they offer some good background on how to interact with the Dropbox filesystem, especially for more complicated cases like this. (For reference, to set the 'Dropbox-API-Path-Root' header using the .NET SDK, you would use the DropboxClient.WithPathRoot method.)
Since there are a few variables here, if this isn't working, please feel free to share the code you're running and the parameters you're passing so we can take a look at this specifically for you. You can open an API ticket here if you'd prefer to share privately.
- KarenCuExplorer | Level 4
Hey Greg-DB, thanks for the response. It looks like we weren't dealing with the difference between team spaces and team folders. I'm now trying to use the FeaturesGetValuesAsync method to handle these different cases, and I'm having an issue passing through a FeaturesGetValuesBatchArg. I'm sure I'm missing something really obvious here, but when I try and create a list of features, they end up with nulls.
HasTeamSharedDropbox feature = new Feature().AsHasTeamSharedDropbox; #this is null FeaturesGetValuesBatchArg = new FeaturesGetValuesBatchArg(new List<Feature>(feature));
Can you point out what I'm doing wrong here? Thanks!
- Greg-DBDropbox Staff
You can make this call like this:
Feature feature = Feature.HasTeamSharedDropbox.Instance; FeaturesGetValuesBatchArg featuresGetValuesBatchArg = new FeaturesGetValuesBatchArg(new List<Feature> { feature }); FeaturesGetValuesBatchResult featuresGetValuesBatchResult = await client.Team.FeaturesGetValuesAsync(featuresGetValuesBatchArg);
Hope this helps!
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!