Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I am using the .NET SDK to interact with dropbox, and I cannot get it to return anything when using Files.ListFolderAsync. I am able to get it to work correctly when using my own personal dropbox, but when I connect to a client's dropbox it is empty. I have verified that they have folders and files in the folder, and that they have granted files.content.read permissions. I have also tested that the connection is working by using:
var checkResult = await _DropboxClient.Check.UserAsync("The check is good");
That returns successfully. Any ideas on what I am missing here?
There are a few things to check here:
By the way, for reference, listing the items in a folder requires "files.metadata.read", not "files.content.read", but regardless, you'd get a more specific error if you didn't have the necessary scope authorized, not just an empty list.
There are a few things to check here:
By the way, for reference, listing the items in a folder requires "files.metadata.read", not "files.content.read", but regardless, you'd get a more specific error if you didn't have the necessary scope authorized, not just an empty list.
Hi Greg, thanks for the reply.
I was able to confirm that it is the correct account by using GetCurrentAccountAsync. Unfortunately, when I was confirming with my client that he created the app with full dropbox access he wasn't sure and decided to delete it and create it over again. After he did that I am having a bit of a different error. I am now getting an exception saying my app does not have the required scope 'files.metadata.read'. My client sent me a screenshot of the permissions though, and that scope is checked. Is it possible it takes a while for the permissions to kick in?
There isn't a delay, but note that scope changes are not retroactive. That is, if you enable a scope on an app, that does not retroactively add that scopes to existing tokens that were authorized before the scope was enabled. If the scope was enabled after connecting the app, the user would need to authorize the app again to grant the newly enabled scope.
It turns out the problem with this was that my client didn't realize he needed to hit the submit button at the bottom after changing permissions. After he did that and I got a new refresh token, I am now able to see the folder structure using Files.ListFolderAsync. I am not sure what the issue was before where I got an empty list returned from ListFolderAsync, but that seems to be cleared up now.
Hi there!
If you need more help you can view your support options (expected response time for a 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!