LiveKit webhooks
LiveKit webhooks notify your application about livestream events such as room creation, participant joining/leaving, and recording status.Webhook endpoint
The LiveKit webhook endpoint is:Webhook authentication
Webhooks require proper authentication via theAuthorization header:
Call webhooks
The general call webhook endpoint handles various streaming events:Signature verification
This endpoint uses signature-based authentication via thex-signature header:
Setting up a webhook receiver
Create a webhook receiver server to handle incoming webhook events:Python
Webhook event types
Common webhook event types you might receive:LiveKit events
LiveKit events
room_started- A new room has been createdroom_finished- A room has endedparticipant_joined- A participant joined the roomparticipant_left- A participant left the roomrecording_started- Recording started for a roomrecording_finished- Recording finished for a roomtrack_published- A track was publishedtrack_unpublished- A track was unpublished
Call events
Call events
call.started- A call has startedcall.ended- A call has endedcall.participant_joined- A participant joinedcall.participant_left- A participant leftcall.recording_ready- Recording is ready for download
Forwarding webhooks
If you need to forward webhook events to Pump.fun from your streaming service:Python
Best practices
1
Verify signatures
Always verify webhook signatures using HMAC to ensure authenticity and prevent tampering.
2
Return quickly
Process webhooks asynchronously. Respond with 200 status immediately and handle processing in background jobs.
3
Implement idempotency
Use event IDs to track processed webhooks and prevent duplicate processing.
4
Handle retries
Implement proper retry logic with exponential backoff for failed webhook deliveries.
5
Log events
Maintain detailed logs of webhook events for debugging and auditing purposes.
6
Secure your endpoint
Use HTTPS and validate all incoming requests to prevent unauthorized access.
Webhook endpoints should respond within 5 seconds. For long-running operations, use a message queue or background job processor.