Events
Match the event type to the API version you use. For V4 run monitoring, see Observability and polling guidance.
Payload
A V2 task event includestask_id, session_id, status, and task metadata:
id as payload.session_id. output is included when available:
Signature verification
Every webhook request includes two headers:X-Browser-Use-Signature: lowercase hexadecimal HMAC-SHA256 signature.X-Browser-Use-Timestamp: Unix timestamp in seconds when this delivery was sent.
{header_timestamp}.{canonical_payload}. The canonical payload is exactly Python’s json.dumps(payload, sort_keys=True, separators=(',', ':'), ensure_ascii=True), applied to the entire event, including its type, timestamp, and payload.
This is not a signature over the raw HTTP body. The sender serializes the HTTP body separately. Non-ASCII characters are escaped in the signed representation: for example, München becomes M\u00fcnchen.
Save this as webhook_verify.py:
Example: FastAPI webhook handler
Installfastapi and uvicorn, put this app.py beside webhook_verify.py, set WEBHOOK_SECRET to the signing secret from your webhook settings, and run uvicorn app:app --port 3000.