System Keys
System Keys are long-lived API keys used for service-to-service authentication against the Lumio API. Unlike OAuth clients (which act on behalf of users) or user API keys (which act on behalf of a single account), a system key authenticates an internal Lumio service such as an external bot worker, a deployment health-check script, or a backend job. They bypass per-account permission guards and should be minted sparingly.
Where to find it
Admin sidebar → System (/system) — the System API Keys card. System Keys and System Connections share this page.
Quick start
- Open Admin → System.
- Scroll to the System API Keys card.
- Click Create Key.
- Enter a descriptive label (e.g.
Twitch Bot Key) and select at least one permission from the chip picker. - Click Create Key and copy the revealed key immediately — it is shown exactly once, stored hashed in the DB.
- Use it as a bearer token in the
Authorizationheader for internal service calls.
Detailed walkthrough
System API Keys card
Shows a key count ("N key(s)") and one card per key, not a table. Each key card shows:
- Label — human-friendly name given at creation, with the key's non-secret prefix in monospace next to it.
- Permissions — the scoped permission list, as chips.
- Created and Last used — dates on one line; "Last used" is omitted when the key has never been used.
- Revoke — a red button, gated on
system-keys:delete. It deletes immediately with no confirmation prompt.
Create System API Key form
Clicking Create Key (gated on system-keys:create) opens an inline card form, not a dialog:
- Label — free text, e.g.
Twitch Bot Key. - Permissions — a chip picker. The Create button stays disabled until a label is entered and at least one permission is selected.
The picker offers: events:read, events:create, chat:read, chat:write, overlays:read, overlays:create, overlays:edit, overlays:delete, connections:read, connections:create, connections:edit, connections:delete, and admin:*.
admin:* is a wildcard grant. Account roles can never carry wildcards — system keys are the one token type that legitimately does — so hand it out sparingly.
Submit invokes POST /v1/admin/system-keys; the response contains the plaintext key only once.
API Key Created reveal dialog
Warning-styled, one-time display:
- Title: "API Key Created — Save Your Key".
- Body: "This key will only be shown once. Copy it now and store it securely."
- Buttons: Copy Key, Dismiss.
Revocation
Revoke deletes the key row immediately — there is no confirmation dialog. Any subsequent request using that key returns 401. There is no soft-disable / re-enable flow — rotation is delete + recreate.
Common scenarios
- Mint a key for a new bot worker — label it after the worker (
kick-bot-prod), store the secret in the secrets manager, configure the worker to sendAuthorization: Bearer <key>. - Rotate a leaked key — create a new key, update the consumer to use it, then revoke the old one.
- Audit inactive keys — scan the "Last used" line on each card and revoke keys with no recent usage. The list is not sortable.
Permissions
| Action | Permission |
|---|---|
| View keys | system-keys:read |
| Create a key | system-keys:create |
| Revoke a key | system-keys:delete |
Dashboard entry requires admin:access. System admins implicitly hold every system-keys permission.
API
| UI action | GraphQL | REST |
|---|---|---|
| List system keys | adminSystemKeys | GET /v1/admin/system-keys |
| Create a system key | adminCreateSystemKey | POST /v1/admin/system-keys |
| Revoke a system key | adminDeleteSystemKey | DELETE /v1/admin/system-keys/\{id\} |
Tips & gotchas
- The plaintext key is shown once. The key card displays only the non-secret prefix afterwards; there is no way to recover the full key, so lost keys must be revoked and recreated.
- Keys are stored as a SHA-256 hash in the
api_keystable (the row is flaggedis_system = true, with no owning user or account). The DB never sees the plaintext after creation. - System keys are one of Lumio's authenticated token contexts. See Authentication for the public auth overview.
- Label is free-form, but putting the environment (
prod,staging) in the name helps auditing later. - Permissions are chosen at creation time and cannot be edited afterwards — there is no update endpoint. Changing a key's scope means creating a new key and revoking the old one.
- Revoke has no confirmation. One click deletes the key.
Related
- System Connections — Lumio's outbound OAuth credentials (shares the same page)
- OAuth Clients — public OAuth apps for third-party users