We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
sl4677
9 years agoExplorer | Level 3
Java example to find recent updates (without having to poll) using webhook notification
Do you have an example in Java that selects recent adds/deletes to a dropbox folder do doesn't require polling? The examples that I pulled from Github do contain one that uses a loop that continu...
sl4677
9 years agoExplorer | Level 3
Hi Greg --
TheAPI documentation you mentioned at https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.1.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#listFolder-java.lang.String-
suggests using ListFolderArg.getRecursive() to keep a local cache of the Dropbox metadata state (e.g. the latest cursor for a user) to be able to find the latest file changes when a user send a Webhook notification. It appears that ListFolderArg was available in version 2.0, but is no longer documented or used in v2.1 .
Using version 2.1, what do you then recommend that I use to store the state locally, to be able to find recent file updates for a user with a Webhook notification?
Thanks,
Sam
Greg-DB
Dropbox Community Moderator
9 years agoThanks for pointing that out! It looks like the documentation needs to be updated.
You can use the builder to build this call with the desired options, like this:
ListFolderResult result = client.files().listFolderBuilder("").withRecursive(true).start();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!