One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
dcooney
7 years agoExplorer | Level 4
list_folder API not starting from beginning of directory
I'm building a mobile app for viewing the /Camera Uploads path and for whatever reason the initial query does not start from the beginning of the directory.
To explain more, my /Camera Uploads files go back as far as 2010, yet the list_folder starts returning entries from 2013 and skips the first 500 or so photos.
I even tried using the API explorer to the same results.
Would there be any reason for this? I can post the code if it would help.
Thank you!
- Greg-DB
Dropbox Staff
The list_folder endpoints do not promise a certain order for the returned entries. I.e., the first returned entries may not be the oldest ones.
Your app should check the has_more value in the result, and if it's true, call back to /2/files/list_folder/continue to get the rest of the entries. Once you process the all of the entries, you can apply whatever ordering you want.- dcooneyExplorer | Level 4
Hi Greg,
Thanks for the reply.
That's fine, but it does start at a seeminly random date and it's always that same date (January 30, 2013). Also, It does continue in order by date after that initial request using the /list_folder/continue method.
Maybe i'm missing something, but just thought I'd ask why this is.- Greg-DB
Dropbox Staff
The exact order will depend on how things work on the Dropbox backend, so while it may be at least partially in chronological order, it's not guaranteed or externally predictable.
As long as you call back and retrieve all of the pages, based on has_more, you should receive all of the entries.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,947 PostsLatest Activity: 8 minutes ago
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!