Forum Discussion

richiebox's avatar
richiebox
New member | Level 2
8 years ago

2/files/list_folder returns empty

Hi, I'm tryingt to list the contents of the root folder. It was returning fine for a while and now it's suddenly stopped return anything? I had one file in there, and I added a couple more to test but it's still returning empty.

 

Would appreciate any help. Request and response below.

 

Request

curl -X POST https://api.dropboxapi.com/2/files/list_folder \
    --header "Authorization: Bearer <my-oauth-token>" \
    --header "Content-Type: application/json" \
    --data "{\"path\": \"\",\"recursive\": true,\"include_media_info\": false,\"include_deleted\": false,\"include_has_explicit_shared_members\": false,\"include_mounted_folders\": true}"

 

Response
{"entries": [], "cursor": "<cursor>", "has_more": false}

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

    Can you double check that there are still entries to list in the relevant account, e.g., via the web site? Make sure you didn't accidentally delete the contents in the Dropbox folder (or in the relevant app folder, if you're using an app with the "app folder" permission). 

     

    If there are definitely active entries that should be returned, please open an API ticket with details (e.g., user ID, app name, and a screenshot of the items if possible) so we can look into it. Thanks in advance! 

    • richieboxie's avatar
      richieboxie
      New member | Level 2

      Thanks for your reply Greg.

       

      It started working again after a few hours. There were files in there and it just started replying with metadata for them. Not sure what happened there?

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff
        I can't say offhand unfortunately. If you'd like us to look into it, we'll need more information. Please open a ticket as requested in my previous reply if you'd like us to do so.