Skip to content

Broadcasts ​

Live video broadcasts, their live chat and live events. Chat moderation methods need you to host or moderate the broadcast.

Broadcasts ​

broadcasts.get(broadcastId, opts?) ​

Gets a broadcast. The with* flags add blocks of fields.

js
const b = await client.broadcasts.get("2ReRnqpjqpWXrW", { withChatPanel: true });

broadcasts.latest(screenName) ​

Gets a user's latest broadcast, or null.

broadcasts.userLive(screenName, opts?) ​

Gets a user's live tab as a timeline.

broadcasts.mine(opts?) ​

Gets your own broadcasts. Needs Premium.

broadcasts.analytics(broadcastId) ​

Gets broadcast analytics.

broadcasts.timeSeries(broadcastId, startTime, endTime) ​

Gets viewer counts between two millisecond timestamps.

broadcasts.clipEditor(broadcastId) ​

Gets the clip editor data.

broadcasts.notifications(userId) ​

Gets your broadcast notification setting for a user.

broadcasts.cohostInvite(broadcastId) / broadcasts.respondCohost(broadcastId, accept?) ​

Reads or answers a cohost invite.

broadcasts.heartbeat(lifecycleToken, action) ​

Updates your viewer session.

Live chat ​

broadcasts.sendChat(broadcastId, message, opts?) ​

Sends a chat message. Takes replyTo, sessionId and chatType.

broadcasts.react(broadcastId, messageId, emoji) ​

Reacts to a message.

broadcasts.reactionCatalog() ​

Gets the emoji you can react with.

broadcasts.myReactions(broadcastId, sinceTs?) ​

Gets your reactions since a timestamp.

broadcasts.reactors(broadcastId, messageId, emoji, opts?) ​

Gets who reacted to a message with an emoji.

broadcasts.mute(broadcastId, userId, messageId) / broadcasts.unmute(broadcastId, userId) ​

Mutes or unmutes a user in chat.

broadcasts.removeMessage(broadcastId, messageId) ​

Removes a chat message.

broadcasts.chatReportReasons() ​

Gets the reasons reportMessage accepts.

broadcasts.reportMessage(broadcastId, messageId, reason, details?) ​

Reports a chat message.

Live events ​

broadcasts.event(eventId) ​

Gets the header of a live event.

broadcasts.eventTitle(eventId) ​

Gets the title of a live event.

broadcasts.eventTabs(eventId) ​

Gets the timeline tabs of a live event.

broadcasts.eventTimeline(eventId, opts?) ​

Gets a live event timeline. latest: true reads the latest tab.

broadcasts.eventReminder(eventId) / broadcasts.setEventReminder(eventId, isSubscribe?) ​

Reads or sets your reminder for a live event.

broadcasts.eventCardVideo(tweetId) ​

Gets the video of a live event card tweet.

not affiliated with X Corp.