Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi
I passed "https://api.dropboxapi.com/2/files/list_folder" to fetch files and folder from root.
and Passed parameters are:-
string path=string.empty;
request.AddHeader("Content-Type","application/json");
request.AddParameter("path", path);
but I got response from api is folollowing:
Error in call to API function "files/list_folder": Bad HTTP "Content-Type" header: "application/x-www-form-urlencoded". Expecting one of "application/json", "application/json; charset=utf-8", "text/plain; charset=dropbox-cors-hack".
and StatusDescription "BadRequest"
Could you please suggest me?
Thanks
Thanks for quick reply.
How i can uplaod a new version for any file using API.
I have try
string data = String.Format("/2/files/upload");
string responseStr = ";
RestRequest request = FormRequest(Method.POST, data, false);
IRestResponse response = new RestSharp.RestResponse();
string fullPathToUpload = metadataJson.path;
string path = string.Format("{1}\"path\":\"{0}\",\"mode\":{1}\".tag\":\"update\",\"update\":\"{3}\"{2}{2}", fullPathToUpload, "{", "}", rev);
request.AddHeader("Dropbox-API-Arg", path);
request.AddHeader("Content-Type", "application/octet-stream;");
request.AddParameter("application/octet-stream", externalFile.InputBytes, ParameterType.RequestBody);
response = executeRequestContent(request);
responseStr = response.Content;
status = response.StatusDescription;
but found nothing got changes in Dropbox account. Plz help.
What's the response from the API to this call?
I got file information in response. but when when i check it in my Dropbox account and file version not getting update and file modified time remain unchanged.
Are you attempting to upload the same exact data as is contained in the current version? Uploading an identical version of a file doesn't create a new revision.
Thanks, I got it.
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!