A lot of early questions we got after launching the new webhooks feature were around how to develop and test a webhook locally.
I put together a small command-line tool to make testing webhooks easier. It's called dropbox_hook.py, and it sends fake webhook requests to mimic what Dropbox itself sends.
Usage
To generate a verification request, run the following:
dropbox_hook.py verify http://127.0.0.1/your-webhook-url
To do that, run the following:
dropbox_hook.py notify http://127.0.0.1/your-webhook-url --secret abc123xyz --user 12345678
The --secret
option should be your Dropbox app secret. The --user
option should be a numeric Dropbox user ID. (In your production app, you'll retrieve a user's user ID during OAuth or by calling /account/info
.)
Get the tool
The full source code for the tool is on Github: github.com/dropbox/dropbox_hook. Feel free to open issues or submit pull requests with changes!