Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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 files, not the entire dropbox.
I've tryed with /files/list_folder but it gives information of all files on a certain path and I don't want this behaviour.
I've seen get_lastest_cursor that gives information of only changes comparing the anterior cursor with the new cursor. I don't know how to use that, because on my java application I don't have this method avaiable:
DbxClientV2 dropboxClient = new DbxClientV2(config,<api_key>); result = dropboxClient.files().get_latest_cursor()??;
Is there any example of this? Is that what I need for receive the latest changes on dropbox?
Thanks.
[Cross-linking for reference: https://stackoverflow.com/questions/45188338/dropbox-latest-changes-webhook ]
Dropbox webhooks will be sent for changes to any files your app can access in the linked users' accounts. It's not possible to configure them to be sent for only specific files, but I'll pass this along as a feature request.
Using listFolder and listFolderContinue, you can list all of the contents of the linked user's account. If you only want new changes though, you can use listFolderGetLatestCursor to get a cursor for the point in time at which you make the listFolderGetLatestCursor call. Then, you can call listFolderContinue again to get any changes that occurred after that point in time. (For example, you can call back using that cursor after you receive a webhook notification for that user.) Make sure you read the listFolder documentation for information on how to use this interface.
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?
Hi there!
If you need more help you can view your support options (expected response time for a 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!