glamorous-oil-12326
09/15/2025, 3:45 PMtall-airline-16756
09/15/2025, 3:45 PMtall-airline-16756
09/15/2025, 3:46 PMglamorous-oil-12326
09/15/2025, 3:48 PMtall-airline-16756
09/15/2025, 3:49 PMwebhook section. Here's a simple example to guide you:
webhook:
# The API key to use in order to sign the message
# This must match one of the keys LiveKit is configured with
api_key: 'your-api-key'
# List of URLs to be notified of room events
urls:
- 'https://yourserver.com/webhook'
When events like room_started happen, LiveKit sends an HTTP POST request to the URLs you've set. This request includes a signed JWT token in the Authorization header, created using the api_key and its secret you specified.
To help you validate the webhook smoothly, you can use LiveKit’s server SDKs. Here's how you might do it in Node.js:
import { WebhookReceiver } from 'livekit-server-sdk';
const receiver = new WebhookReceiver('your-api-key', 'your-api-secret');
app.use(express.raw({ type: 'application/webhook+json' }));
app.post('/webhook', async (req, res) => {
try {
const event = await receiver.receive(req.body, req.get('Authorization'));
console.log('Received webhook event:', event);
res.status(200).send('OK');
} catch (err) {
console.error('Failed to validate webhook:', err);
res.status(401).send('Unauthorized');
}
});
Just a quick reminder to make sure your server accepts payloads with Content-Type: application/webhook+json. If you have any questions or need a hand with any step, please don’t hesitate to ask—I’m here to help!
Sources: Webhooks | LiveKit Docs | Docs::Home | examples/webhooks-nextjs/README.mdglamorous-oil-12326
09/15/2025, 3:49 PMtall-airline-16756
09/15/2025, 3:50 PMapi_key that LiveKit will use to sign webhook messages. Just make sure this key matches one of the API keys you’ve already set up for your project.
When webhook requests come in, they’ll have an Authorization header containing a JWT token signed with the API secret linked to your api_key. To validate these webhooks on your server, you can use a LiveKit server SDK. Here’s a quick example in Node.js:
import { WebhookReceiver } from 'livekit-server-sdk';
const receiver = new WebhookReceiver('your-api-key', 'your-api-secret');
app.use(express.raw({ type: 'application/webhook+json' }));
app.post('/webhook', async (req, res) => {
try {
const event = await receiver.receive(req.body, req.get('Authorization'));
console.log('Received webhook event:', event);
res.status(200).send('OK');
} catch (err) {
console.error('Failed to validate webhook:', err);
res.status(401).send('Unauthorized');
}
});
If you have any questions or need a hand with this setup, just let me know—I’m here to help!
Sources: Webhooks | LiveKit Docs | Docs::Home | Egress API | LiveKit Docsglamorous-oil-12326
09/15/2025, 3:51 PMtall-airline-16756
09/15/2025, 3:51 PMglamorous-oil-12326
09/15/2025, 3:52 PMtall-airline-16756
09/15/2025, 3:53 PM