Discuss Dropbox Developer & API
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
The /2/file_requests/list_v2 endpoint is for listing 'file requests', not actual files. (A "file request" is a way to receive files from other people.)
To list files, you should instead use /2/files/list_folder[/continue].
The /2/file_requests/list_v2 endpoint is for listing 'file requests', not actual files. (A "file request" is a way to receive files from other people.)
To list files, you should instead use /2/files/list_folder[/continue].
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.
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.
SOLVED:
The problem was this:
Say Contet change this and works fine
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 Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!