Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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.
[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.
Please see the screenshot @Gregory
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
Hi there!
If you need more help you can view your support options (expected response time for a 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!