Skip to main content

Providers

The Providers view is the top-level kill-switch dashboard for the streaming platforms Lumio integrates with. Six providers are listed: Twitch, YouTube, Kick, Trovo, Discord, and Spotify. Each exposes a platform kill-switch plus sub-flags for the connection types that platform actually supports: Login, Channel, Bot. It is also where operators configure and connect the Global Bot identity.

Where to find it

Admin sidebar → Providers (/providers).

Quick start

  1. Open Admin → Providers.
  2. Scan the cards — each provider has its own card with the current credentials status ("Configured" / "Not Configured"), connection counts, and the four toggles.
  3. To take a whole platform offline, flip the Platform kill-switch to off.
  4. To block only new logins while keeping existing channel + bot connections, leave Platform on and flip the Login sub-toggle off.
  5. For Discord, paste the Bot Token and click Save Token. For the other bot platforms, click Connect Bot to start the OAuth flow.

Detailed walkthrough

Per-provider card

Each provider card surfaces:

  • Status — Enabled / Disabled at the platform level.
  • Credentials — Configured / Not Configured. This badge reflects system_credentials_configured: whether the platform's global (system) OAuth app is present in the API [auth] config (the {platform}_channel_client_id / {platform}_channel_client_secret pair, resolved by CredentialResolver::system_pair). These keys are set in the API configuration (file or LUMIO__AUTH__* environment variables), not through the admin UI. When the badge is Not Configured the card shows a "Configure Credentials" link to System Connections (/system); note that System Connections manages a separate operator credential store (integration_configs, used for native emote fetches) and does not set the global system OAuth app that this badge tracks.
  • Statistics — Channel Connections, Login Connections, Bot Connections counts, each shown only for the connection types the platform supports.
  • Platform — master kill-switch.
  • Connection Types (sub-toggles) — Login, Channel, Bot. Each can be flipped independently while Platform is on. Only the sub-toggles the platform supports are rendered.

Capabilities come from a static platform registry, so the card shape differs per provider:

ProviderLoginChannelBotIntegration
Twitch
YouTube
Kick
Trovo
Discord
Spotify

Disabling warning text: "Disabling will block new connections and logins. Existing connections will continue working."

Global Bot section

Rendered for platforms that support a Lumio-owned bot identity (Twitch, YouTube, Kick, Trovo, Discord) and only while the platform kill-switch is on. Shows:

  • Connected as <username> when a global bot connection exists, with a Disconnect Bot button (native confirm: "Are you sure you want to disconnect this global bot?").
  • Otherwise "Not connected", with a Connect Bot button that launches the OAuth authorize flow. The button is disabled until the platform's global system OAuth app is Configured. The global bot is always system-sourced: adminBotAuthorizeUrl reads the config system pair via CredentialResolver::system_pair and pins credential_source = "system" on the row. The authorize flow returns through the web host's unified callback ({web.public_url}/api/connections/oauth/{platform}/callback) and the OAuth state handle's return_to sends the browser back into the admin Providers UI.

Discord-specific fields

Instead of the OAuth button, Discord's not-connected state renders two inputs plus Save Token:

  • Application ID — placeholder "Discord Application ID (from Developer Portal)". This input is present in the form but is not part of the save payload; the adminSetDiscordBotToken mutation takes only the token and an optional username.
  • Bot Token — paste the bot token; Save Token stores it encrypted on the global Discord bot_connections row (bot_type = "global", account Uuid::nil()). Discord uses a static admin bot token, not OAuth, so its credential_source stays at the fail-safe account default and no system OAuth app is required.

Integrations row

Providers flagged as having an integration show an extra counter row. Discord is the only listed provider with that flag today, rendering "Discord servers: N".

Common scenarios

  • Twitch EventSub outage — flip Platform → off on Twitch. Existing connections keep working (they use cached tokens via the Token Refresh Worker), but no new logins or reconnects are accepted.
  • Rolling a breaking bot update — disable the Bot sub-toggle only; channel API calls and OAuth logins keep flowing while bots stay disconnected.
  • Global bot reconnect after moving to config keys — global bot OAuth credentials come from the API [auth] config keys, not from integration_configs. Existing integration_configs bot tokens are not migrated automatically, so each OAuth global bot must be reconnected once after the config keys are in place:
    1. Set the platform's global system OAuth app in the API [auth] config ({platform}_channel_client_id / {platform}_channel_client_secret, or the LUMIO__AUTH__* environment variables) and restart the API.
    2. Open Admin → Providers; the platform's Credentials badge flips to Configured.
    3. Click Connect Bot for the platform and complete the OAuth flow. For Discord, paste the Bot Token and click Save Token instead — it has no OAuth flow.
    4. Confirm the Global Bot section shows Connected as <username>.
  • Initial Discord setup — paste the Bot Token on the Discord card and click Save Token. The card flips to "Connected as …". Discord uses a static admin bot token, so no OAuth app or System Connections entry is required for it.
  • YouTube quota exhausted — flip YouTube's Channel sub-toggle off until the daily quota resets.

Permissions

ActionPermission
View provider cards / statsproviders:read
Toggle kill-switches / sub-toggles (GraphQL, used by the admin UI)providers:edit
Get authorize URL / exchange OAuth code / save Discord bot tokenbot-connections:create
Disconnect global botbot-connections:delete
Configure credentials (on System Connections)system-connections:edit

Dashboard entry requires admin:access. System admins implicitly hold every permission above.

The REST PATCH /v1/admin/providers/\{platform\}/toggle and .../\{subtype\}/toggle routes are guarded by features:edit, not providers:edit — the /enabled routes and every GraphQL mutation use providers:edit. The admin UI goes through GraphQL, so providers:edit is what the dashboard needs.

API

UI actionGraphQLREST
List providers with statsadminProvidersGET /v1/admin/providers
Toggle platformadminToggleProviderPATCH /v1/admin/providers/\{platform\}/toggle
Toggle sub-flagadminToggleProviderSubtypePATCH /v1/admin/providers/\{platform\}/\{subtype\}/toggle
Set platform enabled (explicit)adminSetProviderEnabledPATCH /v1/admin/providers/\{platform\}/enabled
Set subtype enabled (explicit)adminSetProviderSubtypeEnabledPATCH /v1/admin/providers/\{platform\}/\{subtype\}/enabled
Get global bot statusadminGlobalBotConnectionsGET /v1/admin/bot-connections
Discord guild count for the integrations rowadminDiscordGuildsGET /v1/admin/discord-guilds
Authorize URL for global botadminBotAuthorizeUrlGET /v1/admin/bot-connections/\{platform\}/authorize
Exchange OAuth codeadminExchangeBotConnectionPOST /v1/admin/bot-connections/\{platform\}/exchange
Save Discord bot tokenadminSetDiscordBotToken(token, username)PUT /v1/admin/bot-connections/discord
Disconnect global botadminDeleteGlobalBotConnectionDELETE /v1/admin/bot-connections/\{platform\}

Tips & gotchas

  • Toggles are hierarchical. Platform off ⇒ Login/Channel/Bot off regardless of their individual state. Turning Platform back on restores the last sub-state.
  • Existing tokens keep working while a toggle is off — the switch gates new flows only. For immediate hard-offline, rotate tokens via System Connections.
  • The Discord Bot Token cannot be read back. If it's lost, generate a new token in the Discord Developer Portal and re-save.
  • Connection counts reflect the latest DB state at page load; they're not live. Refresh for current numbers.
  • Credentials must be Configured before any sub-toggle can be meaningfully used. If Credentials is "Not Configured", the Connect Bot button is disabled.
  • Shopify does not appear in the Providers list. Shopify is registered as an integration-only platform (no login, channel, or bot capability), and adminProviders filters those out. Its kill-switch lives in Feature Flags under the integration category as integration:shopify.
  • StreamElements is not a provider. It is not in the platform registry at all; its kill-switch is the feature:streamelements feature flag.
  • System Connections — operator-managed integration_configs credential store (native emote fetches); not the global-bot OAuth app source
  • Bot Control — per-account pause / resume
  • Discord Guilds — Discord-specific guild mappings
  • Feature Flags — fine-grained feature kill-switches (one layer below provider kill-switches)