Verify Webhook Signature
verify_webhook_signatureVerify Business API webhook deliveries locally by recomputing HMAC-SHA256 and comparing the X-Bapi-Signature value in constant time, helping debug receiver signature checks.
Instructions
Verify a Business API webhook delivery LOCALLY (no network): recompute HMAC-SHA256 over "{t}.{raw_body}" with the endpoint's whsec_ secret and compare it to v1 from the X-Bapi-Signature header ("t=1785552011,v1=") in constant time. raw_body must be the exact bytes received (re-serialised JSON breaks the hash). Returns {valid, reason, ageSeconds}. Use it to debug a receiver; in production implement the same check in the receiver itself.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"secret": "<secret>",
"signature_header": "<signature_header>",
"raw_body": "<raw_body>"
},
"name": "verify_webhook_signature"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| secret | Yes | ||
| raw_body | Yes | ||
| signature_header | Yes | ||
| tolerance_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||