Twitch
Included with Macro DeckShow your Twitch chat and stream stats, moderate, run polls and ads, and react to follows, subs and raids.
A Twitch Chat widget and Twitch Stream Stats widgets with the viewers, chatters and followers
- Twitch Chat and Twitch Stream Stats widgets
- Set title and category, run ads, start raids and create clips
- Polls, predictions, shoutouts and chat modes from a button
- Triggers for follows, subs, cheers, raids and redemptions
- Connect several Twitch accounts
The Twitch integration connects one or more Twitch accounts to Macro Deck. You sign in on Twitch with a short code, and Macro Deck then receives your channel's events as they happen and can act on your channel as that account.
What you can do
- Change the stream title, category and tags, send chat messages and announcements, and give shoutouts.
- Run an ad break, snooze the next one, start or cancel a raid, create a clip or a stream marker.
- Start and end polls and predictions, and mark channel point redemptions as completed or refunded.
- Moderate: ban or time out a user, unban, delete a message, clear the chat, and switch emote-only, followers-only, slow, subscribers-only or unique chat on or off.
- Show your chat with emotes and badges in the Twitch Chat widget, and moderate from it.
- Show your live status, viewers, chatters, followers and subscribers, title, category and uptime in the Twitch Stream Stats widget.
Some example setups:
- A Starting soon button that sets your title and category and sends an announcement.
- An Ad break button that runs a 90 second commercial.
- A Clip button that creates a clip and writes its edit URL into a variable.
- A flow that runs on Channel Point Reward Redeemed for one reward and switches your OBS scene.
- A flow that runs on Raid Received and gives the raider a shoutout.
How it behaves
Macro Deck subscribes to Twitch events for each connected account, so triggers like New Follower, Cheer or Raid Received fire within moments. Stream values such as the viewer count are read from Twitch every 30 seconds. All values are available as variables named twitch_<account>_<value>, for example twitch_mychannel_viewer_count, so you can use them in your own widgets and conditions.
You can connect more than one Twitch account. Every action has an Account field, and every trigger can be limited to one account. If Twitch does not grant every permission Macro Deck asks for, Integrations lists the events that will not fire and offers to reconnect. When the connection to Twitch drops, Macro Deck reconnects on its own. If Macro Deck is not used with an account for 30 days, or you revoke its access on Twitch, the sign-in expires and Integrations asks you to connect the account again.
What you need
- Macro Deck 3 on Windows, macOS or Linux, with internet access
- A Twitch account
- Run Commercial needs an affiliate or partner channel that is live
- Clips and stream markers only work while the channel is live
Set it up
Step 1: Open Twitch in Macro Deck
In Macro Deck, click Integrations in the sidebar and click Twitch. On the Overview tab, click Add configuration in the Configuration section. Turning on the switch at the top right opens the same dialog, and the integration is turned on once the setup is done.
Step 2: Approve the access on Twitch
The dialog Connect a Twitch account shows a Device code. Click Open Twitch and approve: Twitch opens in your browser with the code already filled in. Sign in with the account you want to connect and approve the access.
To use a Twitch application you registered yourself, turn on Advanced configuration and enter its Client ID in Own Client ID (advanced). Leave the field empty to use Macro Deck's own application.
Step 3: Finish the setup
Come back to Macro Deck and click Continue. Macro Deck names the configuration after your account, for example Twitch (mychannel). When the dialog shows Setup complete., click Done.
Step 4: Add a Twitch action to a button
On the Deck page, click the button you want to use. The deck must be unlocked: when the button at the top right reads Lock, it is unlocked. The editor opens with Short Press selected. Click + Add action, select Twitch on the left of the Add action dialog and pick an action such as Send Chat Message. Choose the Account, type the Message, then click Save.
Step 5: Press the button
Press the button on your phone, tablet or in the web client. The message appears in your Twitch chat. To see the chat on your deck, add a Twitch Chat widget.
Actions20
Put these on a button or run them from a flow.
- Set Title and Category
- Changes the stream title, category or tags. Fields left empty are not touched.
- Send Chat Message
- Sends a message to the channel's chat as the connected account, optionally as a reply.
- Send Announcement
- Posts a highlighted announcement in the chat, in a color you choose.
- Send Shoutout
- Gives another channel a shoutout. Twitch allows one every two minutes.
- Clear Chat
- Removes every message from the channel's chat.
- Delete Chat Message
- Removes a single message from the chat.
- Set Chat Mode
- Switches emote-only, followers-only, slow, subscribers-only or unique chat on, off or toggles it.
- Run Commercial
- Starts an ad break of 30 seconds to 3 minutes.
- Snooze Next Ad
- Pushes the next scheduled ad break back by five minutes.
- Start Raid
- Sends the channel's viewers to another channel.
- Cancel Raid
- Stops a raid that has not gone through yet.
- Create Clip
- Clips the last 30 seconds of the broadcast and can write the clip's edit URL into a variable.
- Create Stream Marker
- Marks the current spot in the broadcast for later editing.
- Ban or Time Out User
- Bans a viewer, or times them out when a duration is given.
- Unban User
- Lifts a ban or a timeout.
- Create Poll
- Starts a poll with two to five choices.
- End Poll
- Ends the poll that is currently running.
- Create Prediction
- Starts a channel points prediction with two to ten outcomes.
- End Prediction
- Resolves, locks or cancels the prediction that is currently running.
- Resolve Reward Redemption
- Marks a channel point redemption as completed or refunds it (only for rewards created by the same Twitch application).
Triggers39
A button or flow can react to these events.
- Stream Online
- The channel went live.
- Stream Offline
- The channel stopped streaming.
- Channel Info Updated
- The title, category, language or content labels changed.
- Ad Break Started
- An ad break started on the channel.
- New Follower
- Somebody followed the channel.
- New Subscription
- Somebody subscribed to the channel. Optionally only for one tier.
- Resubscription
- Somebody announced a resubscription in chat.
- Gifted Subscriptions
- Somebody gifted subscriptions to the channel.
- Subscription Ended
- A subscription to the channel ran out.
- Cheer
- Somebody cheered bits in the channel.
- Raid Received
- Another channel raided this one.
- Raid Sent
- This channel raided another one.
- Shoutout Received
- Another channel gave this one a shoutout.
- Shoutout Sent
- The channel sent a shoutout.
- Channel Point Reward Redeemed
- A viewer redeemed a channel point reward. Optionally only for one reward.
- Automatic Reward Redeemed
- A viewer used one of Twitch's built-in channel point rewards.
- Redemption Resolved
- A channel point redemption was accepted or refunded.
- Poll Started
- A poll started in the channel.
- Poll Ended
- A poll in the channel ended.
- Prediction Started
- A prediction started in the channel.
- Prediction Locked
- A prediction stopped taking entries.
- Prediction Ended
- A prediction was resolved or cancelled.
- Hype Train Started
- A hype train started in the channel.
- Hype Train Progress
- A hype train in the channel advanced.
- Hype Train Ended
- A hype train in the channel ended.
- Goal Started
- A creator goal started.
- Goal Progress
- A creator goal advanced.
- Goal Ended
- A creator goal ended.
- Chat Notification
- A sub, resub, gift, raid, announcement or charity notice in chat. Optionally only for one kind.
- Chat Cleared
- The channel's chat was cleared.
- Chat Message Deleted
- A single chat message was deleted.
- Chat Mode Changed
- Emote-only, followers-only, slow, subscriber-only or unique chat was switched.
- User Banned or Timed Out
- A viewer was banned or timed out.
- User Unbanned
- A viewer was unbanned.
- VIP Added
- A viewer was given VIP status.
- VIP Removed
- A viewer lost VIP status.
- Twitch Event (Advanced)
- Every Twitch event, including ones Macro Deck does not model yet, with the raw payload.
- Connected
- Macro Deck connected the account to Twitch.
- Disconnected
- The connection to Twitch was lost.
Variables10
Show these values on buttons and widgets, or use them in conditions.
twitch_<account>_is_connected- Whether the account is connected to Twitch.
twitch_<account>_is_live- Whether the channel is live.
twitch_<account>_stream_title,twitch_<account>_stream_category- The current title and category.
twitch_<account>_viewer_count,twitch_<account>_uptime_seconds- Viewers and how many seconds the stream runs.
twitch_<account>_follower_count,twitch_<account>_subscriber_count,twitch_<account>_subscriber_points- Channel totals of followers, subscribers and subscriber points.
twitch_<account>_chatter_count- Everyone in your chat, including you and bots.
twitch_<account>_stream_thumbnail_url- The URL of the current stream thumbnail.
twitch_<account>_display_name,twitch_<account>_login- The account's display name and login name.
twitch_<account>_emote_only,twitch_<account>_followers_only,twitch_<account>_followers_only_duration,twitch_<account>_slow_mode,twitch_<account>_slow_mode_wait_time,twitch_<account>_subscriber_only,twitch_<account>_unique_chat- The chat modes: emote only, followers only and its duration in minutes, slow mode and its wait time in seconds, subscribers only and unique chat.
twitch_<account>_last_follower,twitch_<account>_last_subscriber,twitch_<account>_last_cheerer,twitch_<account>_last_raider- The most recent follower, subscriber, cheerer and raider.
Widgets2
Add these to your deck from the widget picker.
- Twitch Chat
- Shows your channel's chat with emotes and badges. Press it to open a larger chat where you can delete messages, time out and ban.
- Twitch Stream Stats
- Shows your live status, viewers, chatters, followers and subscribers, title, category and uptime, in a style you choose.
Frequently asked questions
Can I connect more than one Twitch account?
Yes. Click Add configuration again and approve with the other account. Each action has an Account field, and the variables carry the account name, for example twitch_mychannel_is_live.
Why do I have to sign in again?
Twitch ends the sign-in after 30 days without use, or when you revoke Macro Deck's access on Twitch. Integrations then shows that the sign-in expired. Use Reconnect to approve the access again.
Why does an action fail?
Many actions only work in certain situations: Create Clip and Create Stream Marker need the channel to be live, Run Commercial needs an affiliate or partner channel that is live, and Send Shoutout works once every two minutes. If Twitch did not grant a permission, connect the account again to grant it.
Why can I not resolve redemptions of my existing rewards?
Twitch only allows an application to resolve redemptions of rewards that the same application created. Rewards you made in the Twitch dashboard cannot be resolved through the API.
Who can moderate from the chat widget?
Anyone who can use your deck. To only show the chat, turn off Allow moderation in the chat dialog in the widget's settings.
Where are the Twitch tokens stored?
Macro Deck stores the access and refresh tokens encrypted on the computer that runs Macro Deck. You never enter your Twitch password in Macro Deck: you approve the access on Twitch itself.
More in Streaming
OBS Studio
Included with Macro DeckSwitch scenes, control your stream, recording and audio, and react to what happens in OBS Studio.
Meld Studio
Included with Macro DeckSwitch and stage scenes, control layers, effects and audio tracks, and go live in Meld Studio.
Streamlabs Desktop
Included with Macro DeckSwitch scenes, control your stream, recording and audio sources in Streamlabs Desktop.
Streamer.bot
Included with Macro DeckRun Streamer.bot actions, send chat messages and react to every event Streamer.bot reports.
YouTube
Included with Macro DeckShow your YouTube live chat and stream stats, change title and tags, and react to Super Chats and members.