Connect Twitch
A Twitch connection is one channel. Marketing uses it to send a live stream to the channel (it reads the channel's stream key), to set the broadcast's title and category, to read and write the channel's chat, and to read its numbers. It is your org's or a brand's. See Connections for how connecting works in general.
Ways to connect
- Connect, through GreenMind's app, where it is open to your org.
- Use your own app: an application registered in Twitch's developer console. Start at Twitch's new application page; Twitch's guide to registering an app explains the rest. Twitch needs no review of it.
There is no key option.
Making your own app
- Open the Use your own app dialog for Twitch on the Connections page, and keep it open.
- Twitch's developer console requires two-factor authentication on the Twitch account that registers the app. Switch it on in that account's security settings if it is not.
- Open the new application page above and give the application a name. Twitch names are unique across Twitch.
- Add the redirect URL from the dialog as an OAuth Redirect URL, copied exactly.
- Choose a category, and set the client type to Confidential. Create the application.
- Open the application's Manage page. Copy the Client ID, and choose New Secret and copy the secret. A new secret replaces the old one at once.
- Paste both into the dialog and press Connect. Sign in to Twitch as the channel's account and allow it.
Scopes
Twitch applications take their scopes in the sign-in request, so there is nothing to tick in Twitch's console. For your reference, this is what GreenMind asks for:
| Use | Scopes |
|---|---|
| Stream out | channel:read:stream_key |
| Run broadcasts (title and category) | channel:manage:broadcast |
| Live chat | user:read:chat, user:write:chat |
| Read numbers | moderator:read:followers, channel:read:subscriptions, analytics:read:games |
The Use your own app dialog asks for the live scopes only. Reconnect asks for all of them, which is how a connection gains the numbers scopes later. A connection that was given only some of the numbers scopes is read for those alone.
Webhooks
Nothing to set up in Twitch's console. GreenMind makes its own EventSub subscriptions for the channel, using your application's client ID and secret, and Twitch confirms them with a signed request that GreenMind answers.
If it goes wrong
- Twitch asks you to confirm each time you sign in. That is on purpose: GreenMind asks Twitch to confirm which account is signing in.
- Invalid client or redirect mismatch. The client ID or secret is mistyped, the secret was replaced since you copied it, or the OAuth redirect URL on the application differs from the dialog's.
- Needs reconnecting. Twitch no longer accepts the token. Twitch also asks an application to validate tokens regularly, which GreenMind does for you. Reconnect.