Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Gopal B.
10 years agoNew member | Level 1
How to upload files in Dropbox API v2 C# using Nemiro.OAuth
I'm trying to upload file but showing me 400 error.I'm trying the below code for file upload-
RequestResult strReq = OAuthUtility.Post
(
endpoint: "https://content.dropboxapi.com/2/files/upload",
parameters: new HttpParameterCollection
{
{"path", "path"},
{"autorename","false"},
{stream}
},
authorization: AccessToken,
contentType: "application/octet-stream"
);
I couldn't find the reason for this error.I'm following the upload instructions provided here( https://www.dropbox.com/developers/documentation/http/documentation#files-upload ) but it is not helpful for C#.
Any help will be appreciated.
3 Replies
Replies have been turned off for this discussion
- Greg-DB10 years ago
Dropbox Community Moderator
[Cross-linking for reference: https://stackoverflow.com/questions/38122113/how-to-upload-files-in-dropbox-api-v2-c-sharp-using-nemiro-oauth ]
What is the body of the response? It should contain more helpful error information.
- Gopal B.10 years agoNew member | Level 1

Please see the screenshot @Gregory
- Greg-DB10 years ago
Dropbox Community Moderator
You can see the error message in the "Result" line. It indicates that you need to supply the parameters in the "Dropbox-API-Arg" header, or "arg" URL parameter.
You can find more information on how to use this endpoint, along with an example using curl, in the documentation:
https://www.dropbox.com/developers/documentation/http/documentation#files-upload
About 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!