Hi Livekit assistant, I have simple question, If I...
# ask-ai
e
Hi Livekit assistant, I have simple question, If I have attached egress service and configured webhooks for it. I also want to get events for participant joined, left and other livekit events but I am not getting any can you please tell me the setup for it
t
Thanks for reaching out, Muhammad. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It sounds like you’re receiving egress webhooks but not room/participant events (e.g., participant_joined/left). Those come from the project’s webhook configuration, not from per-egress webhooks. To receive participant/room events: • Configure a project-level webhook endpoint: ◦ LiveKit Cloud: set the webhook URL in your project Settings. ◦ Self-hosted: add the
webhook
section (with
api_key
,
api_secret
,
urls
) in your server config. • Ensure your receiver accepts
Content-Type: application/webhook+json
and validates the Authorization JWT. • Test by joining/leaving a room and confirm you see
participant_joined
/
participant_left
. If you’re only setting
WebhookConfig
on egress requests, that will only deliver egress_* events to that URL. Participant events require the project/server webhook setup. Would you like steps for your specific environment (Cloud vs self-hosted) or a sample handler to validate the webhook JWT? For reference: • Webhooks overview and event types: Webhooks | LiveKit docs • Egress per-request webhooks: Egress API | LiveKit Docs Sources: Webhooks | LiveKit docs | Egress API | LiveKit Docs | Webhook & Event System | livekit/livekit_composite | DeepWiki
e
I have self hosted the livekit server
t
Thanks for confirming you’re self‑hosting. To receive participant/room events on a self-hosted LiveKit server, set up a project-level webhook in the server config (separate from any per‑egress webhooks). Do this: 1. In your LiveKit server config, add a
webhook
section with your API key/secret and endpoint URL(s). Example:
Copy code
webhook:
     api_key: YOUR_API_KEY
     api_secret: YOUR_API_SECRET
     urls:
       - https://your-domain.com/livekit/webhook
1. Restart the server to apply changes. 2. Ensure your endpoint: ◦ Accepts
Content-Type: application/webhook+json
◦ Verifies the
Authorization
JWT (HS256 with your
api_secret
) before parsing 1. Join/leave a test room and confirm you receive
participant_joined
/
participant_left
. If you’d like, share your redacted
webhook
config and I can verify it. I can also provide a minimal Express/Node, Go, or Python handler that validates the webhook JWT. For details: Webhooks | LiveKit docs.
e
webhook: api_key: 'KEY' urls: <URLs> livekit-livekit-1 | could not parse config: yaml: unmarshal errors: Nov 05 045130 sfu-livekit-staging docker-compose[4120217]: livekit-livekit-1 | line 80: field api_secret not found in type webhook.WebHookConfig Nov 05 045130 sfu-livekit-staging docker-compose[4120217]: livekit-livekit-1 exited with code 0 when I add secret
t
Thanks for sharing the error. The log “field api_secret not found in type webhook.WebHookConfig” means the
webhook
block doesn’t accept
api_secret
. Use only
api_key
and
urls
there, and ensure the API key you use is one that your server knows (with its secret configured in your API keys). Correct server config snippet:
Copy code
webhook:
  api_key: 'YOUR_API_KEY'
  urls:
    - https://your-domain.com/livekit/webhook
Then, in your webhook receiver, validate the Authorization JWT using the matching API key and its secret (the server signs with HS256 using that secret). Also accept
Content-Type: application/webhook+json
. Docs for reference: Webhooks | LiveKit docs If you want, share your redacted API keys section and your
webhook:
block, and I’ll double‑check the pairing. Sources: Webhooks | LiveKit docs | Webhook & Event System | livekit/livekit_composite | DeepWiki | Egress API | LiveKit Docs