0

enter image description hereI'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.

I have edited my question with the error details.Please see the screenshot attached.

2

1 Answer 1

1

for me the problem was a wrong App key and App secret,if App key and App secret were true for you please look for any parameters or inputs are wrong in your code,the problem maybe not be in the upload code,good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.