cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dropbox API's Files.ListFolderAsync return path not found

Dropbox API's Files.ListFolderAsync return path not found

KarenCu
Explorer | Level 4
Go to solution

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

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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!

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution

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.

KarenCu
Explorer | Level 4
Go to solution

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-DB
Dropbox Staff
Go to solution

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!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    KarenCu Explorer | Level 4
What do Dropbox user levels mean?