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.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
from_broadcaster_id | string | Broadcaster who sends their viewers. Defaults to the user making the call. |
to_broadcaster_id required | string | ID of the broadcaster to raid. |
options: Request options for this call: as, token, signal, timeout, retries.
Returns
Section titled “Returns”Promise<PendingRaid>
Fields of PendingRaid
| Name | Type | Description |
|---|---|---|
created_at | string | When the raid was requested, as an RFC 3339 timestamp. |
is_mature | boolean | Deprecated. Always false. |
Example
Section titled “Example”const raid = await twitch.raids.start({ to_broadcaster_id: "141981764" });cancel
Section titled “cancel”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.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
broadcaster_id | string | Broadcaster who started the raid. Defaults to the user making the call. |
options: Request options for this call: as, token, signal, timeout, retries.
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”await twitch.raids.cancel();