Skip to main content

Webhooks

VideoSDK signs the webhooks it delivers to your endpoints. Use webhooks.verify to check the signature and parse the event before you trust it.

Verify a webhook

Pass the raw, unparsed request body and the videosdk-signature header. Verification is RSA-SHA256, and the signing public key is fetched and cached for you. A missing or invalid signature raises a webhook verification error.

// The body must stay raw, so register the route with a raw body parser.
app.post("/webhooks/videosdk", express.raw({ type: "*/*" }), async (req, res) => {
const event = await client.webhooks.verify(req.body, req.headers["videosdk-signature"]);
if (event.type === "recording-stopped") {
// handle event.data
}
res.sendStatus(200);
});

To skip the network fetch, pin the RSA public key with the webhookPublicKey option (see Configuration). Node also accepts { publicKey } as a third argument, and Go exposes VerifySync(rawBody, signature, publicKey) for a key you already hold.

The webhook event

FieldTypeDescription
typestringEvent type, such as recording-stopped.
dataobjectEvent payload. In Go this is the raw JSON bytes to unmarshal into the shape for the type.
rawbytesThe full raw JSON body (Go only).

Got a Question? Ask us on discord