You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

brotherlogic's avatar
brotherlogic
Explorer | Level 3
6 years ago

files/list_folder not returning all files

I'm trying to pull in a list of all files from dropbox - I have a folder with ~ 500 files in it.

However, if I call list_folder, e.g.:

curl -X POST https://api.dropboxapi.com/2/files/list_folder \
--header "Authorization: Bearer REDACTED" \
--header "Content-Type: application/json" \
--data "{\"path\": \"/Tuckers\",\"recursive\": true,\"include_media_info\": false,\"include_deleted\": false,\"include_has_explicit_shared_members\": false,\"include_mounted_folders\": true,\"include_non_downloadable_files\": true}" &> whee.txt

 

and then list the files:

grep -o path_lower whee.txt | wc
230 230 2530

I only get back a subset of the number of files. The response has_more is false, so I don't quite understand why all the files aren't being returned.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    If has_more is false, you should be getting all of the results for that folder in the account for that access token. It doesn't look like you're doing anything wrong here, so we'll need to look into this more closely. Can you open an API ticket and share that 'whee.txt' file so we can investigate? Thanks in advance!