Today Twitch announced Multi-Month Subscription Gifting. With this new feature, viewers can gift a subscription for multiple months (e.g. 3, 6, or 12) to individual recipients in a single transaction. As a result, we’ve updated the “Channel Subscriptions” PubSub topic to include new fields in the messages you receive and added an IRC USERNOTICE message parameter for subscriptions.
What’s new?
The new fields in the PubSub message object for “Channel Subscriptions” are:
-
is_gift
– Always present in the message object. The value is set totrue
if this sub or resub was caused by a gift subscription,false
otherwise. -
multi_month_duration
– Always present in the message object. The value is an integer set to the duration of the multi-month gift (e.g. 3, 6, 12).
The new message parameter for IRC USERNOTICEs is:
-
msg-params-gift-months
– Only sent on subgift and anonsubgift USERNOTICEs. The value is the number of months gifted as part of a single, multi-month gift.
How do I get started?
To learn more about Multi-Month Subscription Gifting, visit the Twitch help article. To get started with the PubSub topic and IRC updates, visit the PubSub and chat documentation pages.
Please feel free to include comments or questions below.
Update: Changed the information for multi_month_duration
to state this will always be present in the message object. We previously stated that it was only present during known or anonymous multi-month sub gifting.