Examples
Go webhook handler
HTTP handler using the Go webhook SDK
Example HTTP handler that verifies Wocha webhook signatures and dispatches by event type.
Setup
Set your signing secret:
HTTP handler
Signature-only verification
If you prefer to verify and parse separately:
Custom tolerance
Reject signatures older than 10 minutes:
Important notes
- Read raw bytes — use
io.ReadAll(r.Body)before JSON unmarshaling. - Return 2xx quickly — enqueue heavy work; Wocha retries on timeout.
- Idempotency — deduplicate by
event.IdempotencyKeybefore side effects. - Legacy names — handle both
org.*andorganisation.*event types.