Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
mpalmer-sps
8 years agoExplorer | Level 3
HTTP Request in C# using WebClient
I'm trying to get the contents of a folder for downloading from Dropbox in C# using the HTTP libraries. So far I've been trying to use a console application project in Visual Studio but don't seem to...
Greg-DB
Dropbox Community Moderator
8 years agoWe recommend just using the official .NET SDK, so we don't have a sample for doing this directly.
Anyway, the error information you shared is just the status code/line. The response body should contain a more useful error message. Checking the response body is generally the best first step in debugging these. Can you print that out? Thanks in advance!
Anyway, the error information you shared is just the status code/line. The response body should contain a more useful error message. Checking the response body is generally the best first step in debugging these. Can you print that out? Thanks in advance!
mpalmer-sps
8 years agoExplorer | Level 3
It looks like the parameters I'm sending are not in JSON format (see below):
- Greg-DB8 years ago
Dropbox Community Moderator
Thanks! That's correct, that error message indicates that the request body (containing the API call parameters) wasn't valid JSON as required.
Looking at your code, that seems likely, as I don't see where you're building it as JSON, and the code you're calling presumably doesn't default to returning JSON.
You should update your code to take your parameters and format them as a JSON string for use in the request body. You'll probably want to use a JSON library for that, such as Json.NET.
About Apps and Installations
Have a question about a Dropbox app or installation? Reach out to the Dropbox Community and get solutions, help, and advice from members.
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!