# Search results for: "verify webhook signatures"

10 passages from this site, best match first. Each one shows its page URL.

## 1. Webhooks: domain, DNS and SSL events, signed | NameOcean — Verify the signature

URL: https://nameocean.net/developers/webhooks/  
Score: 0.774 · Language: en

t is the Unix time of the request, v1 the hex HMAC-SHA256 of t, a dot and the raw body, keyed with your secret. Compute it over the raw bytes, before parsing the JSON, compare in constant time, and refuse timestamps older than five minutes.

X-NameOcean-Signature

```
t=1794300000,v1=hex(HMAC_SHA256(secret, "1794300000." + raw_body))
```

Python

```
import hashlib, hmac, time

def verify(secret: str, header: str, body: bytes, tolerance: int = 300) -> bool:
    fields = dict(part.split("=", 1) for part in header.split(","))
    ts = int(fields["t"])
    if abs(time.time() - ts) > tolerance:
        return False
    expected = hmac.new(secret.encode(), f"{ts}.".encode() + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, fields.get("v1", ""))
```

Node.js

```
import crypto from "node:crypto";

export function verify(secret, header, rawBody, tolerance = 300) {
  const fields = Object.fromEntries(header.split(",").map((p) => p.split("=", 2)));
  const ts = Number(fields.t);
  if (Math.abs(Date.now() / 1000 - ts) > tolerance) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${ts}.`).update(rawBody).digest("hex");
  const got = Buffer.from(fields.v1 || "", "hex");
  return got.length === 32 && crypto.timingSafeEqual(Buffer.from(expected, "hex"), got);
}
```

Go

```
func Verify(secret, header string, body []byte) bool {
	var ts int64
	var v1 string
	for _, part := range strings.Split(header, ",") {
		k, v, _ := strings.Cut(part, "=")
		switch k {
		case "t":
			ts, _ = strconv.ParseInt(v, 10, 64)
		case "v1":
			v1 = v
		}
	}
	if d := time.Now().Unix() - ts; d > 300 || d < -300 {
		return false
	}
	mac := hmac.New(sha256.New, []byte(secret))
	fmt.Fprintf(mac, "%d.", ts)
	mac.Write(body)
	return hmac.Equal([]byte(hex.EncodeToString(mac.Sum(nil))), []byte(v1))
}
```

---

## 2. Email API: send email, mailboxes, forwarding and inbound mail to webhook | NameOcean — Incoming mail to webhook

URL: https://nameocean.net/developers/email/  
Score: 0.767 · Language: en

Instead of forwarding, an address can post each mail it receives to your HTTPS endpoint as JSON: bodies, headers and attachments in base64. It is open after a short review of what you will use it for; ask on a domain's Email Forwarding page.

curl

```
$ curl -X POST https://nameocean.net/api/v1/email/forwarding/example.com/webhooks \
    -H "Authorization: Bearer $NAMEOCEAN_API_KEY" -H "Content-Type: application/json" \
    -d '{"localpart": "inbound", "url": "https://example.com/hooks/mail"}'
```

POST https://example.com/hooks/mail

```
X-NameOcean-Event: email.received
X-NameOcean-Signature: t=1794300000,v1=5f2b…

{
  "id": "6f1c2a4e-8b3d-4f5a-9c7e-1d2b3a4c5e6f",
  "event": "email.received",
  "envelope": {"from": "alice@example.org", "to": "inbound@example.com"},
  "from": "Alice <alice@example.org>",
  "subject": "Order 1042",
  "text": "Hi…",
  "html": "<p>Hi…</p>",
  "headers": [["From", "Alice <alice@example.org>"], …],
  "attachments": [{"filename": "invoice.pdf", "content_type": "application/pdf", "size": 48211,
                   "content_base64": "JVBERi0…"}],
  "spam_score": 0.4,
  "size": 66120
}
```

The signature works like the account webhooks: see verifying a signature.

---

## 3. Inbound Email Webhook: Receive Email as JSON | NameOcean

URL: https://nameocean.net/article/inbound-email-webhook-receive-email-as-json/  
Score: 0.761 · Language: en

Nov 12, 2026 email webhooks api developers email forwarding python node.js

Short answer: An inbound email webhook turns every message sent to an address on your domain into an HTTPS POST to your app, with the sender, subject, text and HTML bodies, headers and attachments as JSON. You don't run a mail server, poll an IMAP inbox or parse MIME yourself. On NameOcean it is part of the free email forwarding for domains registered with us: point an address such as `inbound@example.com` at your endpoint, and verify each request with its HMAC signature. This guide shows the setup, the JSON you receive, and a tested receiver in Python and Node.js.

---

## 4. Inbound Email Webhook: Receive Email as JSON | NameOcean — Verify the signature

URL: https://nameocean.net/article/inbound-email-webhook-receive-email-as-json/  
Score: 0.758 · Language: en

Anyone who finds your URL can POST to it, so check every request. The `X-NameOcean-Signature` header holds `t`, the Unix time of the request, and `v1`, the hex HMAC-SHA256 of `t`, a dot and the raw request body, keyed with your secret. Compute it over the raw bytes before parsing the JSON, compare in constant time, and refuse timestamps more than five minutes old so a captured request can't be replayed later.

---

## 5. Receive email in your app: inbound email to webhook as JSON | NameOcean — 4. Receive it

URL: https://nameocean.net/developers/guides/receive-email/  
Score: 0.758 · Language: en

Verify the signature over the raw body, then read the JSON. A small Flask receiver:

app.py

```
import base64, hashlib, hmac, json, os, time

from flask import Flask, abort, request

app = Flask(__name__)
SECRET = os.environ["NAMEOCEAN_WEBHOOK_SECRET"]  # whsec_...

def verified(header, body, tolerance=300):
    fields = dict(part.split("=", 1) for part in header.split(",") if "=" in part)
    ts = int(fields.get("t", "0"))
    if abs(time.time() - ts) > tolerance:
        return False
    expected = hmac.new(SECRET.encode(), f"{ts}.".encode() + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, fields.get("v1", ""))

@app.post("/hooks/mail")
def mail():
    body = request.get_data()
    if not verified(request.headers.get("X-NameOcean-Signature", ""), body):
        abort(401)
    mail = json.loads(body)
    print(mail["envelope"]["from"], "→", mail["envelope"]["to"], mail["subject"])
    for a in mail["attachments"]:
        data = base64.b64decode(a["content_base64"])
        print("  attachment", a["filename"], a["content_type"], len(data), "bytes")
    return "", 204  # any 2xx: delivered
```

---

## 6. REST API reference: domains, DNS, SSL and app servers | NameOcean — POST `/webhooks` #

URL: https://nameocean.net/developers/api/  
Score: 0.705 · Language: en

Add a webhook endpoint. An https URL on a public server. The answer includes the signing secret. Up to 10 endpoints.

Scopes: `webhooks:write` · Idempotency-Key

Body field | Type | Description
`url` * | string |
`events` * | string[] |
`description` | string |

curl

```
curl -X POST https://nameocean.net/api/v1/webhooks \
  -H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/hooks/nameocean", "events": ["dns.*", "ssl.issued"]}'
```

201 Created

Response field | Type | Description
`id` | integer |
`url` | string |
`description` | string |
`events` | string[] | Event types, groups like "dns.*", or ["*"]
`active` | boolean |
`disabled_reason` | string | null | Why NameOcean turned it off
`secret` | string | whsec_...: verify X-NameOcean-Signature with it. Not in list answers.
`created_at` | string | null |
`last_success_at` | string | null |
`last_failure_at` | string | null |

Errors: 400 · 401 · 403 · 404 · 429

---

## 7. REST API reference: domains, DNS, SSL and app servers | NameOcean — PATCH `/webhooks/{id}` #

URL: https://nameocean.net/developers/api/  
Score: 0.705 · Language: en

Change a webhook endpoint. Send only what changes. active: true turns a disabled endpoint back on.

Scopes: `webhooks:write` · Idempotency-Key

Parameter | In | Description
`id` * | path | Numeric id e.g. 42

Body field | Type | Description
`url` | string |
`events` | string[] |
`description` | string |
`active` | boolean |

curl

```
curl -X PATCH https://nameocean.net/api/v1/webhooks/42 \
  -H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"active": true}'
```

200 OK

Response field | Type | Description
`id` | integer |
`url` | string |
`description` | string |
`events` | string[] | Event types, groups like "dns.*", or ["*"]
`active` | boolean |
`disabled_reason` | string | null | Why NameOcean turned it off
`secret` | string | whsec_...: verify X-NameOcean-Signature with it. Not in list answers.
`created_at` | string | null |
`last_success_at` | string | null |
`last_failure_at` | string | null |

Errors: 400 · 401 · 403 · 404 · 429

---

## 8. Beyond Headers and Handshakes: Web Bot Auth is Changing How We Verify AI Agents — How to Implement Web Bot Auth Today

URL: https://nameocean.net/article/beyond-headers-and-handshakes-web-bot-auth-is-changing-how-we-verify-ai-agents/  
Score: 0.440 · Language: en

If you're running a major platform or CDN (Cloudflare, AWS WAF, Akamai, etc.), your provider likely already supports Web Bot Auth verification automatically. Check your security dashboard—there's probably a toggle or policy for it.

For those managing your own verification, the process involves these steps:

1. Cache the Public Key Set

Fetch Google's public keys from `https://agent.bot.goog/.well-known/http-message-signatures-directory` and cache them according to the `Cache-Control` header. This is your source of truth for signature validation.

2. Check for the Signature-Agent Header

Incoming signed requests will include a `Signature-Agent` header with `g="https://agent.bot.goog"`. This tells you a cryptographic signature is present.

3. Validate Using RFC 9421

Use the standard HTTP Message Signatures specification to validate the `Signature` header against `Signature-Input`. This is the actual verification step—it's where cryptography confirms the request is legitimate.

4. Handle Expiry Windows Carefully

Signatures expire. Public keys expire too. Don't confuse the two—they have separate validity windows. Validate both independently.

5. Always Fallback

Not every request will be signed. Continue validating against IP addresses, DNS, and User-Agent strings. Web Bot Auth is additive, not exclusive.

One pro tip for latency-sensitive applications: you can serve the response immediately and validate the signature asynchronously, applying results to future requests from that agent. This prevents Web Bot Auth verification from becoming a performance bottleneck.

---

## 9. Debugging Webhooks Locally: Why You Need a Middleman

URL: https://nameocean.net/article/debugging-webhooks-locally-why-you-need-a-middleman/  
Score: 0.433 · Language: en

Jun 13, 2026 webhooks local development developer tools debugging web development devops api integration

If you've ever built an integration with Stripe, GitHub, Slack, or any service that uses webhooks, you know the struggle. You've written your endpoint handler, you're ready to test it, and then reality hits: your local development server isn't reachable from the internet. So you either deploy to staging, pray nothing breaks, or spend hours setting up tunnels and ngrok configurations.

This is where webhook proxy solutions become every developer's best friend. The concept is elegantly simple: instead of sending webhooks directly to your local machine, you point them to a proxy server that forwards them wherever you need. Your machine can sit safely behind NAT, behind a corporate firewall, or just in your living room — the webhook sender never knows the difference.

---

## 10. MCP server: let Claude, Cursor or VS Code manage your domains, DNS and servers | NameOcean — Webhooks

URL: https://nameocean.net/developers/mcp/  
Score: 0.431 · Language: en

`list_webhooks`
read | Webhook endpoints that receive this account's events (domain, DNS, SSL), with the event types they want.
`create_webhook`
write | Send account events to an https URL. events: types such as dns.record.created, groups such as dns.*, or ["*"]; the event list is at https://nameocean.net/developers/webhooks/. Returns the signing secret.
`delete_webhook`
destructive | Stop sending events to a webhook endpoint and delete it.
`send_test_event`
write | Post a webhook.test event to an endpoint now and show what it answered.
`list_webhook_deliveries`
read | Recent deliveries to a webhook endpoint: event, status, attempts, the receiver's answer.

---
