- Home
- Skills
- APIs & Backend
- RelayBox Webhook Debugger: Why the HMAC check failed
More screenshots
Works with the AI Agents you already use
RelayBox Webhook Debugger: Why the HMAC check failed
**The problem** Your RelayBox receiver is returning 401, or an order handler ran twice and you can't tell why.
$12
RelayBox Webhook Debugger: Why the HMAC check failed
Example session with this skill installed
Check the tampered sample body with its sample headers at receive time 1790000060. Explain the MAC result and timestamp result separately.
- Read your context and instructions
- Compiled the relaybox webhook debugger
{
"command": "verify",
"valid": false,
"expected_http_status": "401",
"delivery_id": "evt_test_0001",
"timestamp": "1790000000",
"now": 1790000060,
"skew_seconds": 60,
"tolerance_seconds": 300,
"body_bytes": 83,
"body_sha256": "a0fd650d413a702cf05688b081fd4cf7cfc872420feb15b0a9aa8a950faa4957",
"secret_source": {
"kind": "file",
"name": "references/sample_secret.txt",
"length_bytes": 18
},
"checks": {
"body_size_ok": true,
"delivery_id_format_ok": true,
"timestamp_format_ok": true,
"timestamp_within_window": true,
"signature_format_ok": true,
"mac_match": false,
"probes": {
"matches_with_trailing_newline": false,
"matches_body_only_mac": false
}
},
"reasons": [
"HMAC mismatch: secret, delivery ID, timestamp or raw body bytes differ from what was signed"
],
"hints": [
"Sign and send the exact raw bytes; any re-serialization of JSON changes the MAC."
]
}
The signature is invalid, but the timestamp is fine (60 seconds old, limit 300). Neither sender-mistake check matched. In this sample the amount was edited after signing. With a real delivery, this output alone can't tell you whether the body changed or the secret, ID or timestamp was different. Save the raw bytes before anything parses them, compare the body digest on both sides, then check what the sender signed with. Don't re-sign reformatted JSON and call it fixed.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem Your RelayBox receiver is returning 401, or an order handler ran twice and you can't tell why. Even a six-line delivery log can mix true repeats, a reused ID with a different body, and the same body sent under new IDs. You want to know which one you're looking at before you touch the handler.
See it before you buy: real input, real output Command (from the package folder, exit code 1, 0.025 s):
python3 -I -B scripts/webhook_debug.py verify --body references/sample_payload_tampered.json --headers references/sample_headers.json --secret-file references/sample_secret.txt --now 1790000060
Before: Incoming headers (excerpt of references/sample_headers.json) plus a tampered body
"X-RelayBox-ID": "evt_test_0001",
"X-RelayBox-Timestamp": "1790000000",
"X-RelayBox-Signature": "sha256=7bf865946ff50bc1fcf93367886ac708215a8db205355ffa5ad18881d96770d3"
After: lines copied from the script's output (excerpt):
"valid": false,
"expected_http_status": "401",
"timestamp_within_window": true,
"mac_match": false,
What the numbers show
- Reproduced the published signature examples from GitHub's and Slack's docs plus 3 made-up ones: all 5 digests matched, and all 5 failed once a trailing newline was added.
- Timestamp window: 300 seconds early, on time and 300 seconds late passed; 301 seconds either way failed.
- A made-up 6-delivery log: it found the 3 duplicate groups I planted, with no false groups. Honest limit: no production captures, and not tested against a running RelayBox server.
What you get
- One standalone Python script with 4 commands: verify, sign, dedupe and retry-schedule. Each prints JSON.
- Verify runs 6 checks (body size, ID format, timestamp format, timestamp window, signature format, HMAC match). If the HMAC doesn't match, it also tries two common sender mistakes: a trailing newline and signing the body alone.
- Dedupe sorts a delivery log into three kinds of group (same ID and body, same ID with a different body, same body under different IDs) and cites line numbers.
- Retry-schedule shows when each attempt becomes eligible and when the job goes to the dead-letter queue.
- Your secret comes from a local file or an environment variable. The script never prints it.
- 27 test cases, 4 saved sample outputs and notes on reading the results.
The agent picks the right command, keeps "what failed" apart from "what might have caused it", and gives you next steps in priority order.
Measured on real data (full detail) There are no production captures here. The only real inputs are the published signature examples from GitHub's and Slack's docs. I reproduced both digests, plus three examples I made up, and adding one trailing newline broke all five, as it should.
| Check | Result | Time |
|---|---|---|
| 2 published examples plus 3 made-up ones | All 5 digests matched, and all 5 failed once a newline was added | under 1 ms |
| RelayBox timestamp window, 5 receive times | 300 seconds early, on time and 300 seconds late passed. 301 seconds either way failed | about 30-40 ms per run |
| Made-up 6-delivery log | Found the 3 groups I planted (checked by hand), no false groups | about 30-45 ms |
Times are single runs on Python 3.13 on Linux and include Python startup, so they'll vary on your machine. I haven't tested against a running RelayBox server. The measurement code is in references/benchmarks.md.
Known limitations
- RelayBox only. For Stripe, GitHub or Slack, use their own libraries.
- It doesn't call endpoints, replay deliveries, look in databases or recover raw bytes you didn't save.
- A valid signature doesn't mean the server will accept the JSON or the delivery ID.
- Dedupe exits 0 even when it finds duplicates, so it won't fail a CI job. Retry times are the earliest a job can run and leave out polling and processing time.
Who it's for Backend developers and on-call engineers with RelayBox captures, delivery logs or stored retry policies.
Requires Python 3.8+ and a host that can read text files and run a terminal command. The script uses only the standard library and works unchanged from a temporary file.
Privacy: Runs locally with no network or telemetry. It writes nothing unless you redirect output. Results include secret source paths and byte lengths, but no secret values.
Check it yourself All 27 test cases pass, and the 4 saved sample outputs match the script's output byte for byte. To repeat the measurements above, open the package folder, copy the Python block in references/benchmarks.md to a scratch file such as <work>/measure.py, and run python3 -I -B <work>/measure.py. It checks the 5 signature examples, the 5 newline changes, the 5 timestamp-window cases and the 3 log groups.
Price and guarantee $12 one time, yours to use with any agent that can run Python. Covered by Agensi's money-back guarantee if it doesn't do what this page promises.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.
Supports RelayBox only. Verification capped at 64KB. Does not perform live HTTP requests, database inspection, or full JSON schema validation. Offline diagnostic tool only.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 15 days ago
Permissions
Uses a terminal to run local Python and reads only the body, headers, log and secret file supplied by the user, or the selected secret environment variable. No network access; nothing is sent anywhere. The packaged script writes no files and prints results to stdout; a host may create and delete temporary script/input files.