Hey everyone, I’ve been using the Twitch API EventSub for quite a while and it’s been working fine, however, I noticed that for the same event, we receive different payloads on EventSub and PubSub.
For example, the EventSub subscription payload looks like:
"event": {
"user_id": "1234",
"user_name": "cool_user",
"broadcaster_user_id": "1337",
"broadcaster_user_name": "cooler_user",
"tier": "1000",
"is_gift": false
}
On the other hand, the PubSub (WebSockets) payload has much more valuable info, such as cumulative_months
, streak_months
, context
and sub_message
:
"data": {
"topic": "channel-subscribe-events-v1.44322889",
"message": {
"user_name": "tww2",
"display_name": "TWW2",
"channel_name": "mr_woodchuck",
"user_id": "13405587",
"channel_id": "89614178",
"time": "2015-12-19T16:39:57-08:00",
"sub_plan": "1000",
"sub_plan_name": "Channel Subscription (mr_woodchuck)",
"cumulative_months": 9,
"streak_months": 3,
"context": "resub",
"is_gift": false,
"sub_message": {
"message": "A Twitch baby is born! KappaHD",
"emotes": [
{
"start": 23,
"end": 7,
"id": 2867
}
]
}
}
}
Is there any explanation behind why we don’t have the same amount of information on EventSub and are there plans to include the same info on EventSub?
According to the documentation, EventSub is going to be the main single source of truth for real time events.