We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
graestar888
4 months agoExplorer | Level 4
Webhook configuration
Hi everyone, new to this forum! I'm new to Dropbox development (so apologies for this basic query) and implementing webhooks into my app to download files when a state change occurs (new file adde...
Здравко
Legendary | Level 20
graestar888 wrote:...
I'd be really happy to hear from anyone who has experienced the same or might know of some ways I can try and establish where I am going wrong.
...
Hi graestar888,
Let's see what's there. A good way to debug something is to reproduce the issue. Since you work on local machine and cannot rely on original request you have to reproduce it as correct as possible. Right? 😉 And so what are you using:
graestar888 wrote:...
curl -X POST -H "Content-Type: application/json" -d '{"changes":[{"path_lower":"/expenses/lunch-receipt.jpg","is_directory":false}]}' http://localhost:8001/api/webhook/dropbox/
...
Hm..🤔 How do you conclude that this curl command reproduces the webhook in correct manner? Did you record some of the requests and then reproduce it or...??? 🙂 Rhetoric of course. Never suppose but check it (something you have skipped that lead you to wrong direction)!!! 😉 For more info about request body that you may expect, take a look here (again, aside of that you can just record one such request and reproduce it with curl). There are other mistakes too, but I believe once you fix you start point you will see and fix everything else.
Hope this helps.
PS: The way you're using is synchronous processing of request - something that's discouraged since the response has to be fast (otherwise Dropbox will detect it as a fail and may stop further notifications)! Execute the actual processing (your process_webhook) in detached thread (or in similar way).
graestar888
4 months agoExplorer | Level 4
Thank you! @Здравко for getting back to me.
Please let me ponder that and I will try to work out how to approach this. I am new to this, so it will likely take me a bit of time. Also, I really appreciate the tip on synchronous processing, I wasn't aware about that.
- iNeil4 months agoDropbox Engineer
Hi graestar888 ,
In addition to what Здравко mentioned, please bear in mind that the webhook notifications only indicate when something has changed in an account, but do not themselves indicate what has changed.
To retrieve information on the file changes, you can use the files functionality on the Dropbox API itself to retrieve the necessary information. I recommend reading the following guides for more information:
- https://developers.dropbox.com/detecting-changes-guide
- https://developers.dropbox.com/dbx-file-access-guidePlease feel free to let me know if you have any questions, or if there is anything else I can help you with.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months agoIf 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!