cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to upload files in Dropbox API v2 C# using Nemiro.OAuth

How to upload files in Dropbox API v2 C# using Nemiro.OAuth

Gopal B.
New member | Level 1

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 3

Greg-DB
Dropbox Staff

[Cross-linking for reference: https://stackoverflow.com/questions/38122113/how-to-upload-files-in-dropbox-api-v2-c-sharp-using-nem... ]

What is the body of the response? It should contain more helpful error information.

Gopal B.
New member | Level 1

Please see the screenshot @Gregory

Greg-DB
Dropbox Staff

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

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Gopal B. New member | Level 1
What do Dropbox user levels mean?