My dropbox business account has the following:
Folder A - My Personal User Folder
Folder B - Dropbox business team folder (Let's call this "TestTeam")
And .txt files named test.txt, one in each folder (Folder A, Folder B, and the root "TestTeam")
My Dropbox app is a Dropbox API app with Full Dropbox permission.
Using DownloadAsync, I am only able to download from the root with path "/test.txt"
Trying to download a file from paths "/Folder A/test.txt" (personal folder) or "/Folder B/test.txt" (team folder) gives me a path not found error.
Below is the code of my Download function.
private async Task Download(DropboxClient client, string path, string fileName)
{
using (var response = await client.Files.DownloadAsync(path))
{
var strm = await response.GetContentAsStreamAsync();
string localFilePath = @C:\Users\MyPC\Desktop\ + fileName;
using (var fileStream = File.Create(localFilePath))
{
strm.CopyTo(fileStream);
}
}
}