Keys and webhooks
Everything you do in creekX, your own programs can do too, through its API. And creekX can tell your systems when things happen.
Keys for automation
-
Make a key
Open Settings, then Keys for automation, and choose Make a key. Name it after what uses it, for example "Nightly upload", and choose What it may do: a key may do what a person with that role may.
-
Copy it now
It is shown once. Copy it into your program.
-
Send it with every request
As the header
X-CreekX-Key. For example:curl -H "X-CreekX-Key: YOUR-KEY" https://live.example.com/v1/channels
Make one key per program, so each can be revoked on its own. Revoke a key and it stops at once. The list shows who made each key and when it was last used.
The API
Your server describes its whole API at /openapi.json (for example
https://live.example.com/openapi.json). Open it in any OpenAPI viewer, or
generate a client for your language from it.
Webhooks
creekX calls your system's address when something happens.
-
Add a webhook
Open Settings, then Webhooks, and choose Add webhook. Paste your system's https address.
-
Choose what it is told
For example: a channel goes on air or off air, a video is ready to play, a live's recording is saved, someone starts or stops watching.
-
Copy the signing secret
Shown once. Each event carries a
CreekX-Signatureheader,t=…,v1=…. To check an event is really from your server, compute HMAC-SHA256 of<t>.<the request body>with the secret: it should equal v1. -
Send a test
Choose Send a test. The result shows in a few seconds.
Approval by your own system
For pay-per-view or members-only: in Settings, under Approval by your own system, give the address of your system. creekX then asks it before each stream starts and each viewer watches, and goes ahead only on a yes.