Skip to main content

Providers

The Providers view is the top-level kill-switch dashboard for the streaming platforms Lumio integrates with. Five providers are listed: Twitch, YouTube, Kick, 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. Discord has nothing to set here: the invite Application ID and Secret are API [auth] settings and the bot token is the Discord bot's DISCORD_BOT__BOT__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✅✅✅-
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, Discord) and only while the platform kill-switch is on. For Twitch, YouTube and Kick it 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​

Discord's Global Bot section has no button and no input. It states where the bot is configured:

  • Bot token - the Discord bot reads it from its own configuration, DISCORD_BOT__BOT__TOKEN ([bot].token in the Discord bot's TOML). The API does not store it.
  • Server invite app - the Application ID and secret come from [auth].discord_bot_client_id and [auth].discord_bot_client_secret in the API configuration.

adminBotAuthorizeUrl(platform: "discord") and GET /v1/admin/bot-connections/discord/authorize reject Discord with the same message on both protocols.

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 an OAuth bot platform and complete the flow. Discord is not connected here: its bot token is bot configuration, and servers are connected through the verified invite flow under Connections → Discord.
    4. Confirm the Global Bot section shows Connected as <username>.
  • Initial Discord setup - configure [auth].discord_bot_client_id and [auth].discord_bot_client_secret in the API, and set DISCORD_BOT__BOT__TOKEN (plus the bot's system key, DISCORD_BOT__API__SYSTEM_KEY) on the Discord bot. Restart both. The invite app pair is required to connect servers; it is not stored under System Connections.
  • 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 codebot-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
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.
  • To rotate the Discord bot token, generate a new one in the Discord Developer Portal, set it as DISCORD_BOT__BOT__TOKEN and restart the Discord bot.
  • 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)