cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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: 

Not getting response when I call "2/files/listfolder" method

Not getting response when I call "2/files/listfolder" method

Shilpa M.
New member | Level 1

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

15 Replies 15

Shilpa M.
New member | Level 1

Thanks for quick reply.

 

Shilpa M.
New member | Level 1

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.

 

Greg-DB
Dropbox Staff

What's the response from the API to this call?

Shilpa M.
New member | Level 1

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.

Greg-DB
Dropbox Staff

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.

Shilpa M.
New member | Level 1

Thanks, I got it.

 

Need more support?
Who's talking

Top contributors to this post

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