Webhooks will send events to your code when things happen on your Owncast server. The following are a list of events you can get notified about.
|User joined chat||USER_JOINED|
|User sent chat message||CHAT|
|User changed username||NAME_CHANGE|
How to accept webhooks
/admin/webhookson your owncast server.
- Put in the full public URL to an endpoint that can receive this webhook.
- Select the events you want to be notified of.
- Save this new webhook.
- In any language, on any kind of web server, create an endpoint that accepts a HTTP
POSTrequest. This is where Owncast will be sending events.
- Each event payload will have a
typeproperty that states what of the above events are included, and an
eventDataobject that includes all the specific properties of this event.
- If you need a starting point see our example projects.
If you want to test how webhooks work before you write any code, create a test endpoint at https://requestcatcher.com/, and add the URL it gives you as a webhook in your admin and see the requests come through.