broad-egg-93900
09/15/2025, 5:35 PMtall-airline-16756
09/15/2025, 5:35 PMtall-airline-16756
09/15/2025, 5:35 PMbroad-egg-93900
09/15/2025, 5:35 PMtall-airline-16756
09/15/2025, 5:36 PMLIVEKIT_API_SECRET is a special environment variable that holds the API secret, which helps authenticate and authorize server-side operations in LiveKit. It works hand-in-hand with the LIVEKIT_API_KEY to ensure secure access to LiveKit’s server APIs.
Here’s how it’s mainly used:
• Authentication for Server SDKs: It’s essential for creating access tokens, managing rooms, and handling webhooks. Server SDKs can read this from environment variables if you don’t pass it explicitly.
• Webhook Verification: The WebhookReceiver uses it to confirm that incoming webhook events are genuine.
• Agent Deployment (LiveKit Cloud): When using LiveKit Cloud, this secret is automatically set as an environment variable for agents to enable secure communication.
• Secure Storage: For your safety, it’s stored encrypted and can’t be retrieved after creation, so it should never be shared publicly.
If you have any questions or need a hand with anything specific regarding its use, please feel free to reach out—I’m here to help!
Sources: .env.example | .env.example | examples/.env.example | Secrets management | LiveKit Docs | packages/livekit-server-sdk/README.md