Twitch Reference
This page describes built-in Touch Portal Twitch actions, events and states. For other automation options, see the Touch Portal Capability Model.
Twitch Actions
Send Chat Message
Action settings
1.10
Available since
Send Chat Message To Channel
Action settings
3.0
Available since
Send Whisper
Action settings
3.1
Available since
Announcement
Action settings
3.1.11
Available since
Shout Out
Action settings
3.1.11
Available since
Clear Chat
1.10
Available since
Create Clip
1.9
Available since
Start Advertisement
Action settings
1.9
Available since
Start / Stop Raid
Action settings
3.1.11
Available since
Set Marker
Action settings
1.9
Available since
Own Channel Info To Value
Action settings
4.0
Available since
Own Stream Info To Value
Action settings
4.0
Available since
Streamers Channel Info To Value
Action settings
4.2
Available since
Set Stream Category
Action settings
2.2
Available since
Set Stream Title
Action settings
2.1
Available since
Shield Mode
Action settings
3.1.11
Available since
Start / Cancel Timeout User
Action settings
3.1.11
Available since
Start / Cancel Timeout User (raw)
Action settings
4.5
Available since
Streamer Profile Pic Url To Value
Action settings
4.0
Available since
Switch Mod Status Of User
Action settings
3.1.11
Available since
Switch Slow Chat
Action settings
1.9
Available since
Switch Unique Chat
Action settings
3.1.11
Available since
Switch Vip Status Of User
Action settings
3.1.11
Available since
Switch Emote Only Chat
Action settings
1.9
Available since
Switch Followers Only Chat
Action settings
1.9
Available since
Switch Subscribers Only Chat
Action settings
1.9
Available since
Ban / Unban User
Action settings
3.1.11
Available since
Change Custom Reward State
Action settings
4.5
Available since
Delete Chat Message
Action settings
4.5
Available since
Fulfill Or Cancel Custom Reward
Action settings
4.5
Available since
Get Custom Rewards Info
Action settings
4.5
Available since
Set Stream Tags
Action settings
4.5
Available since
Snooze Next Ad
Action settings
4.5
Available since
Twitch Events
On New Subscriber
Event settings
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
- Subscription Type - This is the type of subscription, this can be Sub (1), ReSub (2), Gift (3), Anonymous Gift (4), ReGift (5) and Anonymous ReGift (6). In some cases this value will be the number representation of the type within Touch Portal.
- Subscription Gifter Display Name - This is the display name of the user that has gifted the subscription. For anonymouse gifts, this will be "Anonymous" and for non-gift subs and resub it will be the same as the recipient.
- Subscription Gifter Login Name - This is the login name of the user that has gifted the subscription. For anonymous gifts, this will be empty or Twitch API specific. Touch Portal will not interpreted or change this value and is passed along to the event as it is been given from the Twitch API. For subs and resubs this will be the same as the recipient.
- Subscription Recipient Display Name - The display name of the user that receives the subscription.
- Subscription Recipient Login Name - The login name of the user that receives the subscription.
- Subscription Months (raw Data Field) - This field represents the cumulative number of months the gifter has giften in the channel. This is a raw data field passed along unaltered from the Twitch API.
- Subscription Multi Month Duration (raw Data Field) - Number of months gifted as part of a single, multi-month gift OR number of months purchased as part of a multi-month subscription. This is a raw data field passed along unaltered from the Twitch API.
- Subscription Cumulative Months (raw Data Field) - Cumulative number of tenure months of the subscription. This is a raw data field passed along unaltered from the Twitch API.
- Subscription Message - The body of the user-entered resub message. Depending on the type of message, the message body contains different fields. If none is specified this state will be an empty text.
- Subscription is Gifts - This represents whether or not this events subscription is a gift or not. The value will be 1 if it is, 0 if it is not.
- Subscription Sub Plan Name (raw Data Field) - Channel Specific Subscription Plan Name. This is a raw data field passed along unaltered from the Twitch API.
- Subscription Sub Plan Code - Subscription Plan ID, values: Prime, 1000, 2000, 3000 (According to Twitch Documentation) but the Prime version can also be represented as 1.
2.2
Available since
On New Subscriber
Event settings
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
- Subscription Type - This is the type of subscription, this can be Sub (1), ReSub (2), Gift (3), Anonymous Gift (4), ReGift (5) and Anonymous ReGift (6). In some cases this value will be the number representation of the type within Touch Portal.
- Subscription Gifter Display Name - This is the display name of the user that has gifted the subscription. For anonymouse gifts, this will be "Anonymous" and for non-gift subs and resub it will be the same as the recipient.
- Subscription Gifter Login Name - This is the login name of the user that has gifted the subscription. For anonymous gifts, this will be empty or Twitch API specific. Touch Portal will not interpreted or change this value and is passed along to the event as it is been given from the Twitch API. For subs and resubs this will be the same as the recipient.
- Subscription Recipient Display Name - The display name of the user that receives the subscription.
- Subscription Recipient Login Name - The login name of the user that receives the subscription.
- Subscription Months (raw Data Field) - This field represents the cumulative number of months the gifter has giften in the channel. This is a raw data field passed along unaltered from the Twitch API.
- Subscription Multi Month Duration (raw Data Field) - Number of months gifted as part of a single, multi-month gift OR number of months purchased as part of a multi-month subscription. This is a raw data field passed along unaltered from the Twitch API.
- Subscription Cumulative Months (raw Data Field) - Cumulative number of tenure months of the subscription. This is a raw data field passed along unaltered from the Twitch API.
- Subscription Message - The body of the user-entered resub message. Depending on the type of message, the message body contains different fields. If none is specified this state will be an empty text.
- Subscription is Gifts - This represents whether or not this events subscription is a gift or not. The value will be 1 if it is, 0 if it is not.
- Subscription Sub Plan Name (raw Data Field) - Channel Specific Subscription Plan Name. This is a raw data field passed along unaltered from the Twitch API.
- Subscription Sub Plan Code - Subscription Plan ID, values: Prime, 1000, 2000, 3000 (According to Twitch Documentation) but the Prime version can also be represented as 1.
4.4.2
Available since
On Channel Point Redemption
Event settings
2.3
Available since
On Chat Message Event
Event settings
2.2
Available since
Subscription Chat Notification Event
Event settings
4.4.2
Available since
On Receiving Bits
Event settings
2.2
Available since
On Host
2.2
Available since
On Raid
2.2
Available since
On Channel Point Rewards Redemption Event
4.4.2
Available since
When Slow Mode Changes
Event settings
4.0
Available since
When Unique Mode Changes
Event settings
4.0
Available since
When Followers Only Chat Changes
Event settings
3.1.11
Available since
When Subscribers Only Chat Changes
Event settings
4.3
Available since
When A Custom Reward Is Redeemed
Event settings
4.3
Available since
When A Shout Out Is Created On Your Channel
4.3
Available since
When Stream Starts Or Stops
Event settings
4.3
Available since
When Emotes Only Chat Changes
Event settings
4.0
Available since
On New Follower
3.0
Available since
On New Whisper
Event settings
3.0
Available since
On Gift Sub Bomb
Event settings
3.0
Available since
On User Ban Or Unban
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
- Issuer User ID - The user ID of the user that issued the ban or unban.
- Issuer User Login name - The user login name of the user that issued the ban or unban.
- Issuer User Name - The user display name of the user that issued the ban or unban.
- (Un)Banned User ID - The user ID of the user that is timed out, banned or unbanned.
- (Un)Banned User Login name - The user login name of the user that is timed out, banned or unbanned.
- (Un)Banned User Display Name - The user display name of the user that is timed out, banned or unbanned.
- Ban Reason - The reason as given by the issuer of the ban (or timeout). This local state is not available for the Unban event.
- Banned at - The UTC date and time (in RFC3339 format) of when the user was banned or put in a timeout. This is a string representation and not a time or data object. This local state is not available for the Unban event.
- Ends at - The UTC date and time (in RFC3339 format) of when the timeout ends. Is empty if the user was banned instead of put in a timeout. This is a string representation and not a time or data object. This local state is not available for the Unban event.
- Is Ban Permanent - Indicates whether the ban is permanent (1) or a timeout (0). If 1, Ends At will be empty.
4.1
Available since
When Shield Mode State Changes
4.5
Available since
On Ad Break Start
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
- Ad Break Requester User ID - The ID of the user that requested the ad. For automatic ads, this will be the ID of the broadcaster
- Ad Break Requester User Login - The login of the user that requested the ad.
- Ad Break Requester User Name - The display name of the user that requested the ad.
- Ad Break Time Stamp - The UTC timestamp of when the ad break began, in RFC3339 format. Note that there is potential delay between this event, when the streamer requested the ad break, and when the viewers will see ads. This is a string representation and not a time or data object.
- Ad Break Duration - Length in seconds of the mid-roll ad break requested.
- Ad Break Is Started Automatic - Indicates if the ad was automatically scheduled via Ads Manager
4.1
Available since
When Channel Info Updates
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
- Title - The channel's stream title.
- Language - The channel's broadcast language.
- Category Id - The channel's category ID.
- Category Name - The channel's category name.
- Classification Labels - String of content classification label IDs currently applied on the Channel separated by commas.
4.1
Available since
When Twitch Charity Campaign Starts / Progresses / Ends
Event settings
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
- Name - The charity's name.
- Description - A description of the charity.
- Logo - A URL to an image of the charity's logo. The image's type is PNG and its size is 100px by 100px.
- Website - A URL to the charity's website.
- Started At - The UTC timestamp (in RFC3339 format) of when the broadcaster started the campaign. This is a string and not a time or date object. This value will only be filled with the started state.
- Stopped At - The UTC timestamp (in RFC3339 format) of when the broadcaster stopped the campaign. This is a string and not a time or date object. This value will only be filled with the stopped state.
- Current Amount Value - The value of the current amount. This is a decimal number.
- Current Amount Pretty - The value of the current amount. This is a string containing the currency as well, example 100.00 USD or 250.00 EUR
- Target Amount Value - The value of the target amount. This is a decimal number.
- Target Amount Pretty - The value of the target amount. This is a string containing the currency as well, example 100.00 USD or 250.00 EUR
4.1
Available since
When A Donation Is Made
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
- Donation Charity Campaign Name - The charity's name.
- Donation Charity Campaign Description - A description of the charity.
- Donation Charity Campaign Logo - A URL to an image of the charity's logo. The image's type is PNG and its size is 100px by 100px.
- Donation Charity Campaign Website - A URL to the charity's website.
- Donator User Id - An ID that identifies the user that donated to the campaign.
- Donator User Login Name - The user's login name.
- Donator User Display Name - The user's display name.
- Donation Amount Value - The amount donated. This is a decimal number.
- Donation Amount Pretty - The donation amount formatted. This is a string containing the currency as well, examples 100.00 USD or 250.00 EUR
4.1
Available since
When A Poll Begins / Progresses / Ends
Event settings
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
- ID - ID of the poll.
- Title - Question displayed for the poll.
- Started At - The time the poll started. This is a String representation, not a time or date object.
- Ends At - The time the poll will end. This is a String representation, not a time or date object.
- Choice Count - The number of choices in this poll.
- Bits Voting Available - Whether bits voting is enabled (1) or not (0).
- Bits Required per Vote - The amount of bits that represent one vote.
- Channel Points Voting Available - Whether Channel Points voting is enabled (1) or not (0).
- Channel Points Required per Vote - The amount of Channel Points that represent one vote.
-
Choices Collection -
This is the collection of choices within this poll. This is a special local state and
requires you to select what part of the choice data structure you want to use. When
you are not using the visual tags system within Touch Portal you need to construct this
value manually. An example is $local2{TwitchPollChoices{[0].title}} where the
important parts to understand are within the double brackets. This first tells which
choice from the choice collection you want to use ([0]), which in this case tells to
use the zero index of the collection which is the first item. Then the second part of the
code is the attribute you want to use from that object. In this case we want the title,
which combined is [0].title.
all options are:
id ID for the choice. title Text displayed for the choice. bits_votes Currently Not used by Twitch; will be set to 0. channel_points_votes Number of votes received via Channel Points. votes Total number of votes received for the choice across all methods of voting.
4.1
Available since
When Hype Train Starts / Progresses / Ends
Event settings
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
- Total - Total points contributed to the Hype Train.
- Progress - The number of points contributed to the Hype Train at the current level.
- Goal - The number of points required to reach the next level.
- Level - The starting level of the Hype Train.
- Started At - The time when the Hype Train started. This is a textual representation of the time, it is not a time or date object.
- Expires At - The time when the Hype Train expires. The expiration is extended when the Hype Train reaches a new level. This is a textual representation of the time, it is not a time or date object.
-
Last Contributor -
The most recent contribution. This is a comma separated string in the format
, , , , . Check out the Twitch API documentation for more information about these structures and data fields. - Top Contributions (raw) - The contributors with the most points contributed. This is the string representation of the raw JSON object received from Twitch. We suggest to use a JSON parsing plugin to get the data from this string. Check out the Twitch API documentation for more information about these structures and data fields.
4.1
Available since
When Twitch Goal Starts / Progresses / Ends
Event settings
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
-
Goal Type -
The type of goal. Possible values (from Twitch API Documentation) are:
follow The goal is to increase followers. subscription The goal is to increase subscriptions. This type shows the net increase or decrease in tier points associated with the subscriptions. subscription_count The goal is to increase subscriptions. This type shows the net increase or decrease in the number of subscriptions. new_subscription The goal is to increase subscriptions. This type shows only the net increase in tier points associated with the subscriptions (it does not account for users that unsubscribed since the goal started). new_subscription_count The goal is to increase subscriptions. This type shows only the net increase in the number of subscriptions (it does not account for users that unsubscribed since the goal started). - Goal Description - A description of the goal, if specified, otherwise empty. The description may contain a maximum of 40 characters.
- Goal is Achieved - A value that indicates whether the broadcaster achieved their goal. Is 1 if the goal was achieved; otherwise, 0. This field is only available for the event when the Goal ends.
- Goal Target Amount - The goal's target value.
- Goal Current Amount - The goal's current value.
- Goal Started At - The UTC timestamp in RFC 3339 format, which indicates when the broadcaster created the goal. This is a String representation and not a date or time object.
- Goal Ended At - The UTC timestamp in RFC 3339 format, which indicates when the broadcaster ended the goal. This is a String representation and not a date or time object. This field is only available for the event when the Goal ends.
4.1
Available since
When Twitch Prediction Starts / Progresses / Ends
Event settings
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
- Prediction Id - Channel Points Prediction ID.
- Prediction Title - Title for the Channel Points Prediction.
- Prediction Started At - The time the Channel Points Prediction started. This is a String representation, not a time or date object.
- Prediction Locks At - The time the Channel Points Prediction will automatically lock. This is a String representation, not a time or date object. Not available in the Lock Event.
- Prediction Locked At - The time the Channel Points Prediction was locked. This is a String representation, not a time or date object. Only available in the Lock event
- Prediction Outcome Count - The amount of outcomes in the outcome collection.
-
Predictions Outcome Collection -
The outcomes collection contains an object that describes each outcome and, if applicable,
the number of users who selected that outcome and the number of Channel Points for that outcome.
This is a special local state and
requires you to select what part of the outcome data structure you want to use. When
you are not using the visual tags system within Touch Portal you need to construct this
value manually. An example is $local2{TwitchPredictionOutcomes{[0].title}} where the
important parts to understand are within the double brackets. This first tells which
outcome from the outcomes collection you want to use ([0]), which in this case tells to
use the zero index of the collection which is the first item. Then the second part of the
code is the attribute you want to use from that object. In this case we want the title,
which combined is [0].title.
all options are:
id The outcome ID. title The outcome title. color The color for the outcome. Valid values are pink and blue. users The number of users who used Channel Points on this outcome. channel_points The total number of Channel Points used on this outcome.
4.1
Available since
On Shout Out Received
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
- Shout Out by User Id - The User ID that identifies the broadcaster that sent the Shoutout.
- Shout Out by User Login - The User Login Name that identifies the broadcaster that sent the Shoutout.
- Shout Out by User Name - The User Name that identifies the broadcaster that sent the Shoutout.
- Shout Out Viewer Count - The number of users that were watching the shout-out-by-broadcaster's stream at the time of the Shoutout.
- Shout Out Started at - The UTC timestamp (in RFC3339 format) of when the moderator sent the Shoutout. This is a String representation and not a date or time object.
4.1
Available since
On Subscription End
Local States descriptions
The local states listed below are being passed along with the event when the event is triggered. They can be used to act on the specifics of the triggered event.
- End Subscription User Id - The user ID for the user whose subscription ended.
- End Subscription User Login - The user login name for the user whose subscription ended.
- End Subscription User Name - The user display name for the user whose subscription ended.
- End Subscription Tier - The tier of the subscription that ended. Valid values are 1000, 2000, and 3000.
- End Subscription Was Gifted - Whether the subscription was a gift.
4.1
Available since