Overview
Testing webhooks during development can be challenging since WhizoAI needs to send HTTP requests to your local server. This guide covers various methods to test webhooks locally.Local Development Tools
1. ngrok (Recommended)
ngrok creates a secure tunnel to your localhost, making it accessible from the internet. Installation:2. localhost.run
No installation required - just use SSH:3. Cloudflare Tunnel
Free and includes additional features:Mock Webhook Server
For testing without external services, create a mock webhook server:Testing Framework Integration
Pytest Example
Jest/Node.js Example
Manual Testing
WhizoAI Dashboard
Use the WhizoAI dashboard to send test webhooks:- Go to Settings → Webhooks
- Select your webhook
- Click Send Test Event
- Choose event type
- Review the response
CLI Testing
Send test webhooks from command line:Using Postman
- Create a new POST request to your webhook URL
- Set Headers:
Content-Type:application/jsonX-WhizoAI-Signature: Calculate using HMAC-SHA256
- Set Body (raw JSON):
- Go to Pre-request Script
- Add:
- In Headers, use:
{{webhook_signature}}
Webhook Testing Tools
webhook.site
Free service to inspect webhooks:- Go to https://webhook.site
- Copy the unique URL
- Register it as your webhook URL
- View incoming requests in real-time
RequestBin
Similar to webhook.site with request inspection:Debugging Webhooks
Enable Verbose Logging
Common Issues
Signature Verification Fails
Signature Verification Fails
Checklist:
- Using raw request body, not parsed JSON?
- Secret matches exactly (no extra spaces)?
- Using correct HMAC algorithm (SHA-256)?
- Comparing signatures with timing-safe function?
Webhook Not Receiving Events
Webhook Not Receiving Events
Checklist:
- Webhook URL is publicly accessible?
- Events are registered for webhook?
- Webhook is active:
webhook.active == True? - Job actually completed/failed?
Request Timeout
Request Timeout
Solutions:
- Respond with 200 within 5 seconds
- Process events asynchronously
- Use background jobs for heavy processing