NagePlatform
Webhooks
Real-time event delivery — every POST signed with HMAC-SHA256.Docs →
Add a webhook
Your webhooks
Loading...
Ad-hoc URL test
Send a signed test event to any URL without saving it — debug a new endpoint before committing.
Verify the signature
import hmac, hashlib
def verify(body: bytes, signature: str, secret: str) -> bool:
expected = hmac.new(
secret.encode(), body, hashlib.sha256
).hexdigest()
return hmac.compare_digest(expected, signature)
# FastAPI example:
@app.post("/hooks/nage")
async def hook(request: Request):
body = await request.body()
sig = request.headers["X-Nage-Signature"]
if not verify(body, sig, os.environ["NAGE_HOOK_SECRET"]):
raise HTTPException(401)
event = (await request.json())["event"]
# ... handle event