cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right 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: 

Re: Shared folders are no longer visible with ListFolderAsync method

Shared folders are no longer visible with ListFolderAsync method

burcubolek
Explorer | Level 3

I was using DropboxClient.Files.ListFolderAsync(path) method to list all folders with Dropbox.Api. Now, I can't see shared folders. Any help would be greatly appreciated.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff

@burcubolek A "path/not_found" Dropbox API error indicates that the API call failed because there was nothing currently found at the specified path in the connected account under the relevant root. For example, this can happen if there's a mistake or typo in the path value the app supplies, if the file/folder has been renamed, moved, or deleted from that path, if the app is not connected to the correct account for that particular path, etc.

 

When specifying the path, make sure you provide the full and accurate path for the desired file under the relevant root. For example, if you have a file named "example.csv" inside a folder named "folder", the path would be "/folder/example.csv". You can find more information on path formats here.

 

Here are several things you can check in particular to debug this:

 

  • Make sure you're using a currently accurate path value: You can use /2/files/list_folder and /2/files/list_folder/continue to list the contents of a folder so you can check what the correct path values would be for items in those folder(s). To list the root, set path to the empty string "" when calling /2/files/list_folder. You can use the path_lower or id values returned for the files/folders in that folder to interact with those files/folders.

 

  • Make sure you're connected to the correct account for the path value you're using: You can use /2/users/get_current_account to check which account the app is connected to.

 

  • Make sure you're using app folder-relative paths, if your app is registered for the "app folder" access type: Apps with the "app folder" access type can only access the contents of the special app folder that gets automatically created for it. If your app has the "app folder" access type, then it will only be able to access files in the app folder, and the root for any path value supplied by that app will automatically be the app folder root. You can find more information on app permissions here. For example, If your app has the app folder access type and you're trying to access something you can see on the Dropbox web site at "/Apps/<app folder name>/folder/example.csv", you should only send the path value as "/folder/example.csv".

 

  • Make sure you're accessing the relevant root: When using an app with the "full Dropbox" access type, API calls default to the member folder, but if you're trying to access the "team space" (only applicable to members of a team with the "team space" configuration), you'll need to configure that as the root explicitly, as covered in the Team Files Guide.

View solution in original post

4 Replies 4

Здравко
Legendary | Level 20

Hi @burcubolek,

Did you try with DropboxClient.Files.ListFolderContinueAsync after initial DropboxClient.Files.ListFolderAsync? 🤔 If not try it. 😉

Good luck.

burcubolek
Explorer | Level 3

@Здравко wrote:

Hi @burcubolek,

Did you try with DropboxClient.Files.ListFolderContinueAsync after initial DropboxClient.Files.ListFolderAsync? 🤔 If not try it. 😉

Good luck.


yes, actually my code is like that : 

private async Task<DropboxApi.Files.ListFolderResult> listAllFolders(string path)
{
var list = await client.Files.ListFolderAsync(path);
bool hasMore = list.HasMore;
var cursor = list.Cursor;
while (hasMore)
{
var continueList = await client.Files.ListFolderContinueAsync(cursor);
cursor = continueList.Cursor;
hasMore = continueList.HasMore;
foreach (var i in continueList.Entries)
{
list.Entries.Add(i);
}
}
return list;
}


it was working like a month ago. it was listing all the folders including shared folders. now, it's not working. I am trying to figure out why. its giving "path/not_found/..." error.

Здравко
Legendary | Level 20

Hi again @burcubolek,

Your code looks good.

 


@burcubolek wrote:

... I am trying to figure out why. its giving "path/not_found/..." error.


Here we have something different! Where you know from that your parameter is correct? Did you check it? If not, do it. 😉

Hope this helps.

Greg-DB
Dropbox Staff

@burcubolek A "path/not_found" Dropbox API error indicates that the API call failed because there was nothing currently found at the specified path in the connected account under the relevant root. For example, this can happen if there's a mistake or typo in the path value the app supplies, if the file/folder has been renamed, moved, or deleted from that path, if the app is not connected to the correct account for that particular path, etc.

 

When specifying the path, make sure you provide the full and accurate path for the desired file under the relevant root. For example, if you have a file named "example.csv" inside a folder named "folder", the path would be "/folder/example.csv". You can find more information on path formats here.

 

Here are several things you can check in particular to debug this:

 

  • Make sure you're using a currently accurate path value: You can use /2/files/list_folder and /2/files/list_folder/continue to list the contents of a folder so you can check what the correct path values would be for items in those folder(s). To list the root, set path to the empty string "" when calling /2/files/list_folder. You can use the path_lower or id values returned for the files/folders in that folder to interact with those files/folders.

 

  • Make sure you're connected to the correct account for the path value you're using: You can use /2/users/get_current_account to check which account the app is connected to.

 

  • Make sure you're using app folder-relative paths, if your app is registered for the "app folder" access type: Apps with the "app folder" access type can only access the contents of the special app folder that gets automatically created for it. If your app has the "app folder" access type, then it will only be able to access files in the app folder, and the root for any path value supplied by that app will automatically be the app folder root. You can find more information on app permissions here. For example, If your app has the app folder access type and you're trying to access something you can see on the Dropbox web site at "/Apps/<app folder name>/folder/example.csv", you should only send the path value as "/folder/example.csv".

 

  • Make sure you're accessing the relevant root: When using an app with the "full Dropbox" access type, API calls default to the member folder, but if you're trying to access the "team space" (only applicable to members of a team with the "team space" configuration), you'll need to configure that as the root explicitly, as covered in the Team Files Guide.
Need more support?