Forum Discussion

brtdvrs's avatar
brtdvrs
Helpful | Level 5
3 years ago
Solved

cannot get list of files .NET

I think my code is simple:

string token = "sl.<REDACTED>";

 

var dbx = new DropboxClient(token);

var res = await dbx.Files.ListFolderAsync(path: "");
foreach (var entry in res.Entries)
{
Console.WriteLine(entry.Name);
}

if have no entries (Count=0) here.

I have 4 folders and 1 file in in my dropbox folder. 

  • brtdvrs As Здравко said, you may have registered your app for "app folder" access, in which case it would only be able to access the contents of the special app folder that gets created for it automatically. You can find more information here. App folders are empty by default.

3 Replies

  • Здравко's avatar
    Здравко
    Legendary | Level 20
    3 years ago

    Hi brtdvrs,

    Does your application able to access your entire account or access only your App' folder only? 🧐 If the access is restricted, your can't see anything outside your App's folder! Recreate the application if you set it's access restricted by mistake. 😉

     Hope this gives direction.

  • brtdvrs's avatar
    brtdvrs
    Helpful | Level 5
    3 years ago
    I have it restricted to App folder, so I created a folder with the same name on my Dropbox, that’s the way to do i guess ?
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    3 years ago

    brtdvrs As Здравко said, you may have registered your app for "app folder" access, in which case it would only be able to access the contents of the special app folder that gets created for it automatically. You can find more information here. App folders are empty by default.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If 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, Facebook or Instagram.

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!