Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Verify webhook signatures and endpoint URL rules
Content-Type
application/json
svix-id
svix-timestamp
svix-signature
v1,...
import { Webhook } from "svix" const secret = process.env.WEBHOOK_SECRET app.post("/webhooks/beach", (req, res) => { const payload = req.rawBody const headers = { "svix-id": req.headers["svix-id"], "svix-timestamp": req.headers["svix-timestamp"], "svix-signature": req.headers["svix-signature"], } const wh = new Webhook(secret) let msg try { msg = wh.verify(payload, headers) } catch { return res.status(400).send("Invalid signature") } const { event, data } = msg console.log(event, data) res.status(200).send("OK") })
from svix.webhooks import Webhook, WebhookVerificationError secret = os.environ["WEBHOOK_SECRET"] def handle_webhook(payload: bytes, headers: dict): wh = Webhook(secret) try: msg = wh.verify(payload, headers) except WebhookVerificationError: return False return True
url