Skip to content

Twitch Widget

Shows live status for a list of Twitch channels — profile picture, live/offline badge, stream title, game, and viewer count. Channels are sorted by viewer count (or live-first) and a "Show More" button collapses long lists.

Requirements

A free Twitch developer app is required to get API credentials. No subscription or Twitch affiliate status needed.

  1. Go to dev.twitch.tv/console and log in
  2. Click Register Your Application
  3. Give it any name (e.g. Homepage Dashboard)
  4. Set the OAuth Redirect URL to http://localhost (it isn't used)
  5. Set the Category to Application Integration (or any category)
  6. Click Create, then open the app and click New Secret
  7. Copy your Client ID and Client Secret into the widget settings

Configuration

KeyTypeDefaultDescription
clientIdstringTwitch app Client ID
clientSecretstringTwitch app Client Secret
channelsstring[][]Channel logins to track (from the URL: twitch.tv/login)
sortBy'viewers' | 'live''viewers'Sort order — viewer count descending, or live-first alphabetical
collapseAfternumber5Show a "Show More" button after this many channels
refreshIntervalnumber60000Refresh interval in milliseconds
hideHeaderbooleanfalseHide the widget title bar
defaultCollapsedbooleanfalseStart collapsed

How it works

The server exchanges your Client ID and Secret for an app access token via the Twitch Helix API. The token is cached in memory and automatically refreshed before it expires (app tokens last ~60 days). Calls to /helix/users and /helix/streams are batched — all channels are fetched in a single request each.

Channels not returned by /helix/users (e.g. a misspelled login) are silently ignored. Channels returned by /helix/users but absent from /helix/streams are shown as offline — Twitch only includes live streams in the streams response.

Notes

  • Channel logins are case-insensitive (use the login from the URL, not the display name)
  • The widget refreshes every 60 seconds by default; lower values will increase API usage
  • Client credentials are stored in your widget config and sent to the server — use HTTPS in production

Personal Homepage Dashboard