You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Platfus's avatar
Platfus
New member | Level 2
2 years ago

C# API SDK ListFolderAsync doesn't work

Hi! 

I'm trying to list all files in a public folder which Url address I've been given, but I'm getting an error.

Here's my code, its pretty basic:

 

string url = "https://www.dropbox.com/sh/{ABCD}/{EFGH}?dl=0";
using (var dbx = new DropboxClient("MY TOKEN"))
{
     var sharedLink = new SharedLink(url);
     var folderContent = dbx.Files.ListFolderAsync(path: "", sharedLink: sharedLink).Result;

}

 

And the error says:

AdditionalInfo: System.AggregateException: One or more errors occurred. ()
---> Dropbox.Api.RetryException
at Dropbox.Api.DropboxRequestHandler.RequestJsonString(String host, String routeName, String auth, RouteStyle routeStyle, String requestArg, Stream body)
at Dropbox.Api.DropboxRequestHandler.RequestJsonStringWithRetry(String host, String routeName, String auth, RouteStyle routeStyle, String requestArg, Stream body)
at Dropbox.Api.DropboxRequestHandler.Dropbox.Api.Stone.ITransport.SendRpcRequestAsync[TRequest,TResponse,TError](TRequest request, String host, String route, String auth, IEncoder`1 requestEncoder, IDecoder`1 resposneDecoder, IDecoder`1 errorDecoder); Request Id: 14f0484e05dc4439bba8d2506eaea6a0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()

 

I also tried to send a HTTP request via Postman, but I just get 500 Internal Server Error. Is there something wrong with this endpoint and I just need to do it some other ways?

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 3 days ago
333 Following

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 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!