Skip to content
twitch.apiv2.0

Reference / API groups

twitch.raids

Raids: start one, cancel a pending one.

Every method of twitch.raids, with its parameters, what it returns and the token it needs.

twitch.raids.start(params, options?): Promise<PendingRaid>

Prepares a raid on another channel. The viewers only leave once the broadcaster confirms in the Twitch interface or after a 90 second countdown, so listen to the channel raid event to know that it happened. Limited to 10 calls per 10 minutes.

Token: user, scope channel:manage:raids.

NameTypeDescription
from_broadcaster_idstringBroadcaster who sends their viewers. Defaults to the user making the call.
to_broadcaster_id requiredstringID of the broadcaster to raid.

options: Request options for this call: as, token, signal, timeout, retries.

Promise<PendingRaid>

Fields of PendingRaid
NameTypeDescription
created_atstringWhen the raid was requested, as an RFC 3339 timestamp.
is_maturebooleanDeprecated. Always false.
const raid = await twitch.raids.start({ to_broadcaster_id: "141981764" });

Twitch reference

twitch.raids.cancel(params?, options?): Promise<void>

Cancels a raid that has not left yet. Limited to 10 calls per 10 minutes.

Token: user, scope channel:manage:raids.

NameTypeDescription
broadcaster_idstringBroadcaster who started the raid. Defaults to the user making the call.

options: Request options for this call: as, token, signal, timeout, retries.

Promise<void>

await twitch.raids.cancel();

Twitch reference