Generates a LiveKit JWT token for a participant to join a specific room.
state - Shared application state containing LiveKit configurationrequest - Token request with room name and participant detailsResponse - JSON response with token or error statusJWT token obtained from the authentication service. Required when AUTH_REQUIRED is enabled.
Request body for generating a LiveKit token
{
"room_name": "conversation-room-123",
"participant_name": "Alice Smith",
"participant_identity": "user-alice-456"
}Unique identifier for the participant (e.g., "user-123")
"user-alice-456"
Display name for the participant (e.g., "John Doe")
"Alice Smith"
The LiveKit room name to generate a token for
"conversation-room-123"
Token generated successfully
Response containing the generated LiveKit token
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"room_name": "conversation-room-123",
"participant_identity": "user-alice-456",
"livekit_url": "ws://localhost:7880"
}The LiveKit server URL to connect to
"ws://localhost:7880"
Echo back the participant identity for client confirmation
"user-alice-456"
Echo back the room name for client confirmation
"conversation-room-123"
The generated JWT token for LiveKit
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."