Use connection.on(WebcastEvent.NAME, handler) for livestream messages and ControlEvent.NAME for connection notifications. Enum values and their string aliases identify the same listener.
import { TikTokLiveConnection, WebcastEvent } from 'tiktok-live-connector';
const connection = new TikTokLiveConnection('creator_username', {});connection.on(WebcastEvent.CHAT, (event) => { console.log(event.user?.displayId, event.content);});await connection.connect();The tables cover all 68 WebcastEvent members in this checkout. See control events for all eight ControlEvent members and their argument lists. Types are inferred from ClientEventMap; the API reference and protobuf reference provide their full definitions.
Messages are not flattened. IDs and 64-bit counts often use strings; nested messages can be absent. A defined subscription does not guarantee that TikTok emits it in every room. Fields described only by the schema should not be treated as a verified live workflow.
Find an event
Section titled “Find an event”| Event | Listener string | Payload | Reference |
|---|---|---|---|
WebcastEvent.CHAT | chat | WebcastChatMessage | Chat and audience |
WebcastEvent.MEMBER | member | WebcastMemberMessage | Chat and audience |
WebcastEvent.ROOM_USER | roomUser | WebcastRoomUserSeqMessage | Chat and audience |
WebcastEvent.LIKE | like | WebcastLikeMessage | Chat and audience |
WebcastEvent.SOCIAL | social | WebcastSocialMessage | Chat and audience |
WebcastEvent.FOLLOW | follow | WebcastSocialMessage | Chat and audience |
WebcastEvent.SHARE | share | WebcastSocialMessage | Chat and audience |
WebcastEvent.QUESTION_NEW | questionNew | WebcastQuestionNewMessage | Chat and audience |
WebcastEvent.EMOTE | emote | WebcastEmoteChatMessage | Chat and audience |
WebcastEvent.GIFT | gift | WebcastGiftMessage | Gifts and goals |
WebcastEvent.ENVELOPE | envelope | WebcastEnvelopeMessage | Gifts and goals |
WebcastEvent.GOAL_UPDATE | goalUpdate | WebcastGoalUpdateMessage | Gifts and goals |
WebcastEvent.BOOST_CARD | boostCard | WebcastBoostCardMessage | Gifts and goals |
WebcastEvent.GIFT_BROADCAST | giftBroadcast | WebcastGiftBroadcastMessage | Gifts and goals |
WebcastEvent.GIFT_DYNAMIC_RESTRICTION | giftDynamicRestriction | WebcastGiftDynamicRestrictionMessage | Gifts and goals |
WebcastEvent.GIFT_PANEL_UPDATE | giftPanelUpdate | WebcastGiftPanelUpdateMessage | Gifts and goals |
WebcastEvent.GIFT_PROMPT | giftPrompt | WebcastGiftPromptMessage | Gifts and goals |
WebcastEvent.LINK_MIC_BATTLE | linkMicBattle | WebcastLinkMicBattle | Battles and cohosting |
WebcastEvent.LINK_MIC_ARMIES | linkMicArmies | WebcastLinkMicArmies | Battles and cohosting |
WebcastEvent.LINK_MIC_BATTLE_ITEM_CARD | linkMicBattleItemCard | WebcastLinkMicBattleItemCard | Battles and cohosting |
WebcastEvent.LINK_MIC_BATTLE_PUNISH_FINISH | linkMicBattlePunishFinish | WebcastLinkMicBattlePunishFinish | Battles and cohosting |
WebcastEvent.LINK_MIC_BATTLE_TASK | linkMicBattleTask | WebcastLinkmicBattleTaskMessage | Battles and cohosting |
WebcastEvent.LINK_MIC_FAN_TICKET_METHOD | linkMicFanTicketMethod | WebcastLinkMicFanTicketMethod | Battles and cohosting |
WebcastEvent.LINK_MIC_METHOD | linkMicMethod | WebcastLinkMicMethod | Battles and cohosting |
WebcastEvent.LINK_MESSAGE | linkMessage | WebcastLinkMessage | Battles and cohosting |
WebcastEvent.LINK_LAYER | linkLayer | WebcastLinkLayerMessage | Battles and cohosting |
WebcastEvent.LINK_MIC_LAYOUT_STATE | linkMicLayoutState | WebcastLinkMicLayoutStateMessage | Battles and cohosting |
WebcastEvent.LINK_STATE | linkState | WebcastLinkStateMessage | Battles and cohosting |
WebcastEvent.SPEAKER | speaker | WebcastSpeakerMessage | Battles and cohosting |
WebcastEvent.SUPER_FAN | superFan | WebcastBarrageMessage | Subscriptions and super fans |
WebcastEvent.SUPER_FAN_JOIN | superFanJoin | WebcastBarrageMessage | Subscriptions and super fans |
WebcastEvent.SUPER_FAN_BOX | superFanBox | WebcastEnvelopeMessage | Subscriptions and super fans |
WebcastEvent.SUB_NOTIFY | subNotify | WebcastSubNotifyMessage | Subscriptions and super fans |
WebcastEvent.SUB_PIN_EVENT | subPinEvent | WebcastSubPinEventMessage | Subscriptions and super fans |
WebcastEvent.LIVE_INTRO | liveIntro | WebcastLiveIntroMessage | Room messages and display |
WebcastEvent.BARRAGE | barrage | WebcastBarrageMessage | Room messages and display |
WebcastEvent.SYSTEM | system | WebcastSystemMessage | Room messages and display |
WebcastEvent.ROOM_MESSAGE | roomMessage | WebcastRoomMessage | Room messages and display |
WebcastEvent.CAPTION_MESSAGE | captionMessage | WebcastCaptionMessage | Room messages and display |
WebcastEvent.IN_ROOM_BANNER | inRoomBanner | WebcastInRoomBannerMessage | Room messages and display |
WebcastEvent.POLL_MESSAGE | pollMessage | WebcastPollMessage | Room messages and display |
WebcastEvent.ROOM_PIN | roomPin | WebcastRoomPinMessage | Room messages and display |
WebcastEvent.BOTTOM_MESSAGE | bottomMessage | WebcastBottomMessage | Room messages and display |
WebcastEvent.CAPSULE | capsule | WebcastCapsuleMessage | Room messages and display |
WebcastEvent.GUIDE | guide | WebcastGuideMessage | Room messages and display |
WebcastEvent.MARQUEE_ANNOUNCEMENT | marqueeAnnouncement | WebcastMarqueeAnnouncementMessage | Room messages and display |
WebcastEvent.NOTICE | notice | WebcastNoticeMessage | Room messages and display |
WebcastEvent.ROOM_NOTIFY | roomNotify | WebcastRoomNotifyMessage | Room messages and display |
WebcastEvent.TOAST | toast | WebcastToastMessage | Room messages and display |
WebcastEvent.VIEWER_PICKS_UPDATE | viewerPicksUpdate | WebcastViewerPicksUpdateMessage | Room messages and display |
WebcastEvent.HOURLY_RANK | hourlyRank | WebcastHourlyRankRewardMessage | Rankings |
WebcastEvent.RANK_UPDATE | rankUpdate | WebcastRankUpdateMessage | Rankings |
WebcastEvent.RANK_TEXT | rankText | WebcastRankTextMessage | Rankings |
WebcastEvent.GAME_RANK_NOTIFY | gameRankNotify | WebcastGameRankNotifyMessage | Rankings |
WebcastEvent.IM_DELETE | imDelete | WebcastImDeleteMessage | Moderation and access |
WebcastEvent.UNAUTHORIZED_MEMBER | unauthorizedMember | WebcastUnauthorizedMemberMessage | Moderation and access |
WebcastEvent.MSG_DETECT | msgDetect | WebcastMsgDetectMessage | Moderation and access |
WebcastEvent.ROOM_VERIFY | roomVerify | WebcastRoomVerifyMessage | Moderation and access |
WebcastEvent.ACCESS_CONTROL | accessControl | WebcastAccessControlMessage | Moderation and access |
WebcastEvent.ACCESS_RECALL | accessRecall | WebcastAccessRecallMessage | Moderation and access |
WebcastEvent.PERCEPTION | perception | WebcastPerceptionMessage | Moderation and access |
WebcastEvent.OEC_LIVE_SHOPPING | oecLiveShopping | WebcastOecLiveShoppingMessage | Games, commerce, and partnerships |
WebcastEvent.LIVE_GAME_INTRO | liveGameIntro | WebcastLiveGameIntroMessage | Games, commerce, and partnerships |
WebcastEvent.PARTNERSHIP_DROPS_UPDATE | partnershipDropsUpdate | WebcastPartnershipDropsUpdateMessage | Games, commerce, and partnerships |
WebcastEvent.PARTNERSHIP_GAME_OFFLINE | partnershipGameOffline | WebcastPartnershipGameOfflineMessage | Games, commerce, and partnerships |
WebcastEvent.PARTNERSHIP_PUNISH | partnershipPunish | WebcastPartnershipPunishMessage | Games, commerce, and partnerships |
WebcastEvent.CONTROL_MESSAGE | controlMessage | WebcastControlMessage | Stream control |
WebcastEvent.STREAM_END | streamEnd | { action: ControlAction } | Stream control |
Delivery and processing
Section titled “Delivery and processing”Register listeners before connecting to receive initial data. Disable processInitialData if your application should skip the signing response’s historical batch.
The modern dispatcher sends each recognized social follow/share to its derived event instead of SOCIAL. Super-fan barrage/envelope messages additionally emit their original BARRAGE/ENVELOPE event; do not double-count them if listening to both.
Asynchronous listeners need their own rejection handling. The client does not await your listener’s returned promise. Decode filters affect all connections and also suppress events derived from filtered messages.