Table of Contents

Class LiveKitWebhookReceiver

Namespace
LiveKit.Services
Assembly
LiveKit.AspNetCore.ServerSdk.dll
public sealed class LiveKitWebhookReceiver : ILiveKitWebhookReceiver
Inheritance
LiveKitWebhookReceiver
Implements
Inherited Members

Constructors

LiveKitWebhookReceiver(ILiveKitTokenVerifier)

Initializes a new instance of the LiveKitWebhookReceiver class.

public LiveKitWebhookReceiver(ILiveKitTokenVerifier tokenVerifier)

Parameters

tokenVerifier ILiveKitTokenVerifier

The token verifier service.

Exceptions

ArgumentNullException

Thrown when tokenVerifier is null.

Methods

ReceiveAsync(string, string?, bool, CancellationToken)

Receives and validates a webhook event from LiveKit.

This method performs two-layer security validation: 1. JWT Token Verification - Validates the token signature and expiration 2. SHA256 Checksum - Verifies the request body hasn't been tampered with

public Task<WebhookEvent> ReceiveAsync(string body, string? authorizationHeader = null, bool skipAuth = false, CancellationToken cancellationToken = default)

Parameters

body string

The raw JSON body of the webhook request.

authorizationHeader string

The Authorization header value containing the JWT token.

skipAuth bool

If true, skips authentication and signature validation. Use only for testing.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<WebhookEvent>

The parsed webhook event containing event type, room, participant, and other event-specific data.

Exceptions

ArgumentException

Thrown when validation fails or the body cannot be parsed.

InvalidOperationException

Thrown when the SHA256 checksum validation fails.