Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester  here!

Forum Discussion

adolfochairez's avatar
adolfochairez
Explorer | Level 3
6 years ago
Solved

Get List of files

I am using the DropBox API to retrieve the list of files in my account.
But it returns the following:

{"file_requests": [], "cursor": "AADerDxM8V_QQRJQgZRYpGTqYBnD8wSl2InNNU0QJnXZgPapKCqPSJIurqgKVUSCSeixo2HSYVRqM-KAs_FrYmeJ8XPOe67op6xH95mDljNf56FIcs-jD1XDYjHi1ARHhAbS6G89E7ir_BrHZIF5rwZIY94cKTR6yMSio1VLx5eqLg", "has_more": false}

This despite having multiple files.

This is the code (I'm using PowerBuilder 2019 R2):

Thanks in advacne

4 Replies

  • adolfochairez's avatar
    adolfochairez
    Explorer | Level 3
    6 years ago

    Maybe I didn't explain myself, I'm trying to retrieve all the file list from my account.
    It changes to the instruction files/list_folder but it marks the following error:

    Error in call to API function "files/list_folder": This function requires its argument in the HTTP request body, but your request body is empty.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    Yes, using /2/files/list_folder[/continue] is the right way to list the files in an account. To list every file, you would set the 'path' parameter to the empty string "" (not "/"), and set 'recursive' to true.

     

    The error you're getting indicates that the call failed because the HTTPS request body was empty, instead of containing the expected parameters. I see from your code that you are attempting to set the body via the 'SetBody' method, but that's apparently not actually getting sent to the server.

     

    I can't provide support for the Appeon PowerBuilder environment or OAuthClient/OAuthRequest/ResourceResponse classes themselves as they aren't made by Dropbox though, so I recommend referring to the documentation for those for information on how to configure/debug HTTPS requests like this.

  • adolfochairez's avatar
    adolfochairez
    Explorer | Level 3
    6 years ago

    SOLVED:

    The problem was this:

    Say Contet change this and works fine

     

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers815 PostsLatest Activity: 2 days ago
277 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or 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!