cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We are making some updates so the Community might be down for a few hours on Monday the 11th of November. Apologies for the inconvenience and thank you for your patience. You can find out more here.

View, download, and export

Need support with viewing, downloading, and exporting files and folders from your Dropbox account? Find help from the Dropbox Community.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: webhooks

webhooks to listen for changes in specific path rather than whole dropbox of user account

ch26
Helpful | Level 7
Go to solution

Hi Team

Is there possibility to listen for changes in only specific paths in dropbox through webhooks?

 

Thanks in Advance.

1 Accepted Solution

Accepted Solutions

Здравко
Legendary | Level 20
Go to solution

The result from "list_folder/continue" on call in webhook is same like in any other call in any other condition. There is JSON result example, also. In a real situation result will be changed entries - all files and/or folders. As a example - you can find can find current last cursor/iterator for you account using:

curl -X POST https://api.dropboxapi.com/2/files/list_folder/get_latest_cursor --header "Authorization: Bearer <your token>" --header "Content-Type: application/json" --data "{\"path\": \"\",\"recursive\": true}"

Change something inside your account content and call following:

curl -X POST https://api.dropboxapi.com/2/files/list_folder/continue --header "Authorization: Bearer <your token>" --header "Content-Type: application/json" --data "{\"cursor\": \"<the cursor from previous call>\"}" | jq '.entries[] | {name, id, path_display}'

Result will point just made changes, if any (little bit filtered for improved readability). Without the filter, "cursor" could be used next time. This same result is the delta!

View solution in original post

12 Replies 12

Fiona
Dropbox Staff
Go to solution

Hello @ch26 

Thank you for posting about webhooks and Dropbox. 

For other users visiting this discussion, you can check out the tutorial info about webhooks and Dropbox, clicking below: 

https://www.dropbox.com/developers/reference/webhooks

Unfortunately, it's not possible to configure webhooks for specific actions or paths in particular. 

If there is anything else I can help with, please let me know. 

Thank you! 


Fiona
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, please give it a Like below. 
:white_check_mark: Did this post fix your issue/answer your question? If so please press the 'Accept as Solution' button to help others find it.
:arrows_counterclockwise: Still stuck? Ask me a question! (
Questions asked in the community will likely receive an answer within 4 hours!)

ch26
Helpful | Level 7
Go to solution

Hi @Fiona

Thanks for the reply and info!!.

 

ch26
Helpful | Level 7
Go to solution

Hi Team

As I read from the documentation is that we cannot get what file actually changed in dropbox through webhooks instead we only get account details of that user.

Is there any way to get what path has specifically changed?

Здравко
Legendary | Level 20
Go to solution

Hi @ch26,

If you keep last "list" iterator, in Web hook handler call to "list/continue" will shows only "deltas" 😉. Here you can save the new last iterator for use on next hook handling and so on.
Hope this helps.

ch26
Helpful | Level 7
Go to solution

Hi @Здравко

Thanks for the reply, but can you provide any sample code or any reference for that so, I can have better view on that.

Здравко
Legendary | Level 20
Go to solution

Hi @ch26,

The tutorial in webhook reference is a good example, I think. Examples are in Python, but the idea is clear enough. You can "translate" to whatever programing language in use. :wink:

Good luck!

ch26
Helpful | Level 7
Go to solution

Thank you @Здравко

ch26
Helpful | Level 7
Go to solution

Here , save the new last iterator on next hook handling means using cursor on calling list_folder/continue delta???

Здравко
Legendary | Level 20
Go to solution
Different terms, same meaning - iterator or cursor - synonymous in particular. 😉
Need more support?