How webhooks work
Configuration
Single webhook
- CLI Flag
- Environment Variable
- Docker
Multiple webhooks
Send events to multiple endpoints (comma-separated):Event filtering
Control which events are forwarded to your webhook:Available events
| Event | Description |
|---|---|
message | Text, media, contact, location messages |
message.reaction | Emoji reactions to messages |
message.revoked | Deleted/revoked messages |
message.edited | Edited messages |
message.ack | Delivery and read receipts |
message.deleted | Messages deleted for the user |
group.participants | Group member join/leave/promote/demote |
group.joined | You were added to a group |
newsletter.joined | You subscribed to a newsletter |
newsletter.left | You unsubscribed from a newsletter |
newsletter.message | New message in a newsletter |
newsletter.mute | Newsletter mute setting changed |
call.offer | Incoming call received |
If
webhook-events is not configured (empty), all events are forwarded.HMAC signature verification
Every webhook request includes an HMAC-SHA256 signature for verification.Configure secret
secret
Verify signature
Webhook payload structure
All webhook payloads follow this structure:Message event
Message reaction
Message acknowledgment
server- Delivered to serverdelivery- Delivered to recipient deviceread- Read by recipient
Group participants event
add- Participants addedremove- Participants removedpromote- Promoted to admindemote- Demoted from admin
Call offer event
Multi-device webhooks
With multiple devices, thedevice_id field identifies which account received the event:
TLS certificate verification
By default, GOWA verifies TLS certificates when sending webhooks. For self-signed certificates or Cloudflare tunnels:Retry behavior
GOWA retries failed webhook deliveries:- Timeout: 30 seconds per request
- Retry attempts: 3 times
- Backoff: Exponential (1s, 2s, 4s)
- Failed delivery: Event is dropped after 3 attempts
Your webhook endpoint should respond with
200 OK within 30 seconds to avoid timeouts.Best practices
Respond quickly
Return
200 OK immediately, process events asynchronously with queuesVerify signatures
Always validate HMAC signatures to prevent spoofing
Filter events
Only subscribe to events you need to reduce processing overhead
Handle duplicates
Store processed message IDs to handle potential duplicate deliveries
Troubleshooting
Webhooks not received
Webhooks not received
- Check webhook URL is publicly accessible
- Verify
WHATSAPP_WEBHOOKenvironment variable - Check GOWA logs for delivery errors
- Test webhook endpoint with
curl
TLS certificate errors
TLS certificate errors
--webhook-insecure-skip-verify=true for development, or add proper SSL certificate in production.Signature verification fails
Signature verification fails
- Ensure webhook secret matches on both sides
- Verify you’re hashing the raw JSON body (not parsed object)
- Check HMAC algorithm is SHA256
- Compare raw signature header with computed value
Missing events
Missing events
- Check
WHATSAPP_WEBHOOK_EVENTSfilter configuration - Verify device is connected (
GET /devices/{id}/status) - Check GOWA server logs for event processing errors
Next steps
Webhook integration guide
Complete webhook setup tutorial
Payload schemas
Full event payload documentation
Receiving messages
Handle incoming messages
Configuration
All webhook configuration options
