Reference / API groups
twitch.teams
Teams: look one up, list the teams of a channel.
Every method of twitch.teams, with its parameters, what it returns and the token it needs.
ofChannel
Section titled “ofChannel”twitch.teams.ofChannel(params, options?): Promise<ChannelTeam[]>Lists the teams a broadcaster is a member of. The list is empty when there are none.
Token: app or user.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
broadcaster_id required | string | Broadcaster whose teams to list. |
options: Request options for this call: as, token, signal, timeout, retries.
Returns
Section titled “Returns”Promise<ChannelTeam[]>
Fields of ChannelTeam
| Name | Type | Description |
|---|---|---|
broadcaster_id | string | ID of the broadcaster. |
broadcaster_login | string | Login name of the broadcaster. |
broadcaster_name | string | Display name of the broadcaster. |
background_image_url | string | null | URL of the background image, or null when the team has none. |
banner | string | null | URL of the banner, or null when the team has none. |
created_at | string | When the team was created, as an RFC 3339 timestamp. |
updated_at | string | When the team was last changed, as an RFC 3339 timestamp. |
info | string | Description of the team. May hold HTML, Markdown and line breaks. |
thumbnail_url | string | URL of the team logo. |
team_name | string | Name of the team: the one that appears in URLs. |
team_display_name | string | Display name of the team. |
id | string | ID of the team. |
Example
Section titled “Example”const teams = await twitch.teams.ofChannel({ broadcaster_id: "141981764" });twitch.teams.get(params, options?): Promise<Team | null>Gets a team and its members, by name or by ID. Resolves with null when
Twitch returns no team.
Token: app or user.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
name | string | Name of the team. |
id | string | ID of the team. |
options: Request options for this call: as, token, signal, timeout, retries.
Returns
Section titled “Returns”Promise<Team \| null>
Fields of Team
| Name | Type | Description |
|---|---|---|
users | TeamMember[] | Members of the team. |
background_image_url | string | null | URL of the background image, or null when the team has none. |
banner | string | null | URL of the banner, or null when the team has none. |
created_at | string | When the team was created, as an RFC 3339 timestamp. |
updated_at | string | When the team was last changed, as an RFC 3339 timestamp. |
info | string | Description of the team. May hold HTML, Markdown and line breaks. |
thumbnail_url | string | URL of the team logo. |
team_name | string | Name of the team: the one that appears in URLs. |
team_display_name | string | Display name of the team. |
id | string | ID of the team. |
Example
Section titled “Example”const team = await twitch.teams.get({ name: "livecoders" });console.log(team?.users.length);