Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Lechucico
9 years agoHelpful | Level 6
Dropbox files/list_folder behaviour
Hello,
Actually I'm building an app that needs notifications when a file is created, modified or deleted. I have a webhook configured correctly.
I just need notifications about these file...
Lechucico
9 years agoHelpful | Level 6
But ListFolderGetLatestCursor needs a path too. I have to iterate over all folders for every user to see changes? There isn't any way of obtaining just the files that have changed?
I don't get how to just get the modifications, creations and deletions, because with that I have to iterate over all folders.
Webhook notifies when modified, created or deleted a file or folder. There isn't any way of obtaning that array of files on the webhook?
Greg-DB
Dropbox Community Moderator
9 years agoThe webhook itself doesn't tell you what has changed. It only tells you when something has changed.
You can certainly get just new changes after calling ListFolderGetLatestCursor though. It sounds like this is the process you're looking for:
1) Set up your webhook.
2) Call ListFolderGetLatestCursor with path="" (to indicate root, i.e., for all folders in the account that your app can see) and recursive=true (i.e., for all depths in those folders) and store the resulting cursor.
3) Wait for the webhook to notify you of changes.
4) When notified, call listFolderContinue using that stored cursor from step 2 to get only the things that have changed since then.
5) Store the new cursor returned by listFolderContinue. (Repeat if hasMore is true.)
6) Wait for further changes and repeat the loop.
You can certainly get just new changes after calling ListFolderGetLatestCursor though. It sounds like this is the process you're looking for:
1) Set up your webhook.
2) Call ListFolderGetLatestCursor with path="" (to indicate root, i.e., for all folders in the account that your app can see) and recursive=true (i.e., for all depths in those folders) and store the resulting cursor.
3) Wait for the webhook to notify you of changes.
4) When notified, call listFolderContinue using that stored cursor from step 2 to get only the things that have changed since then.
5) Store the new cursor returned by listFolderContinue. (Repeat if hasMore is true.)
6) Wait for further changes and repeat the loop.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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, Facebook or Instagram.
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!