Skip to content

Receive webhooks locally

Send webhook requests from an external provider to a handler on your machine.

Run your webhook handler at http://127.0.0.1:3000/webhooks. Have access to the provider settings where you configure its destination URL.

Configure the destination

npx tubu-cli http 3000 --domain my-hooks.tubu.dev

Wait for the tunnel to be ready. In the provider settings, use https://my-hooks.tubu.dev/webhooks as the destination URL. The path and query are forwarded unless you configure rewrites.

Validate the provider signature in your handler. If you enable Tubu HTTP secret protection, the provider must be able to send the X-Tubu-Auth header.

Send a test event

Send a provider test event, or use this unsigned sample:

curl --fail https://my-hooks.tubu.dev/webhooks \
  -H 'Content-Type: application/json' \
  --data '{"event":"test"}'

Expect the status and response your handler defines. A handler that requires a provider signature can reject this unsigned sample.