Get Teams
Gets information about the specified Twitch team. Read More
You must specify exactly one of the name and id query parameters; the request fails if you specify none of them or more than one.
Endpoint
GEThttps://api.twitch.tv/helix/teams
Authorization
Requires one of the following:
Query Parameters
nameStringThe name of the team to get. This parameter and the id parameter are mutually exclusive; you must specify the team's name or ID but not both.idStringThe ID of the team to get. This parameter and the name parameter are mutually exclusive; you must specify the team's name or ID but not both.
Response Body
dataObject[]A list that contains the single team that you requested.Hide child attributesShow child attributes
data.usersObject[]The list of team members. This field is omitted if the team has no members.Hide child attributesShow child attributes
data.users.user_idStringAn ID that identifies the team member.data.users.user_loginStringThe team member's login name.data.users.user_nameStringThe team member's display name.
data.background_image_urlStringNullableA URL to the team's background image. This field is null if the team does not have a background image set.data.bannerStringNullableA URL to the team's banner. This field is null if the team does not have a banner image set.data.created_atStringNullableThe UTC date and time (in RFC3339 format) of when the team was created.data.updated_atStringNullableThe UTC date and time (in RFC3339 format) of the last time the team was updated.data.infoStringThe team's description. The description may contain formatting such as Markdown, HTML, newline (\n) characters, etc.data.thumbnail_urlStringNullableA URL to a thumbnail image of the team's logo. This field is null if the team does not have a logo set.data.team_nameStringThe team's name.data.team_display_nameStringThe team's display name.data.idStringAn ID that identifies the team.
Response Codes
- 200OK
- Successfully retrieved the team's information.
- 400Bad Request
- The name or id query parameter is required.
- Specify either the name or id query parameter but not both.
- The ID in the id query parameter is not valid.
- 401Unauthorized
- The Authorization header must contain an app access token or user access token.
- The access token is not valid.
- The ID specified in the Client-Id header does not match the client ID specified in the access token.
- 404Not Found
- The specified team was not found.
Request Example
example language for Get Teams
curl -X GET 'https://api.twitch.tv/helix/teams?id=6358' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/teams?id=6358" `
-Method Get -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/teams?id=6358", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.twitch.tv/helix/teams",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
params={
"id": "6358",
},
)
data = response.json()req, _ := http.NewRequest("GET", "https://api.twitch.tv/helix/teams?id=6358", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/teams?id=6358");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
]);
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.twitch.tv/helix/teams?id=6358");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.get("https://api.twitch.tv/helix/teams?id=6358")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;Response Example
{
"data": [
{
"users": [
{
"user_id": "278217731",
"user_name": "mastermndio",
"user_login": "mastermndio"
},
{
"user_id": "41284990",
"user_name": "jenninexus",
"user_login": "jenninexus"
},
...
],
"background_image_url": null,
"banner": null,
"created_at": "2019-02-11T12:09:22Z",
"updated_at": "2020-11-18T15:56:41Z",
"info": "<p>An outgoing and enthusiastic group of friendly channels that write code, teach about technology, and promote the technical community.</p>",
"thumbnail_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/team-livecoders-team_logo_image-bf1d9a87ca81432687de60e24ad9593d-600x600.png",
"team_name": "livecoders",
"team_display_name": "Live Coders",
"id": "6358"
}
]
}Get Channel Teams
Gets the list of Twitch teams that the broadcaster is a member of.
Endpoint
GEThttps://api.twitch.tv/helix/teams/channel
Authorization
Requires one of the following:
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster whose teams you want to get.
Response Body
dataObject[]The list of teams that the broadcaster is a member of. Returns an empty array if the broadcaster is not a member of a team.Hide child attributesShow child attributes
data.broadcaster_idStringAn ID that identifies the broadcaster.data.broadcaster_loginStringThe broadcaster's login name.data.broadcaster_nameStringThe broadcaster's display name.data.background_image_urlStringNullableA URL to the team's background image. This field is null if the team does not have a background image set.data.bannerStringNullableA URL to the team's banner. This field is null if the team does not have a banner set.data.created_atStringNullableThe UTC date and time (in RFC3339 format) of when the team was created.data.updated_atStringNullableThe UTC date and time (in RFC3339 format) of the last time the team was updated.data.infoStringThe team's description. The description may contain formatting such as Markdown, HTML, newline (\n) characters, etc.data.thumbnail_urlStringNullableA URL to a thumbnail image of the team's logo. This field is null if the team does not have a logo set.data.team_nameStringThe team's name.data.team_display_nameStringThe team's display name.data.idStringAn ID that identifies the team.
Response Codes
- 200OK
- Successfully retrieved the list of teams.
- 400Bad Request
- The broadcaster_id query parameter is missing or invalid.
- 401Unauthorized
- The Authorization header must contain an app access token or user access token.
- The access token is not valid.
- The ID specified in the Client-Id header does not match the client ID specified in the access token.
- 404Not Found
- The broadcaster was not found.
Request Example
example language for Get Channel Teams
curl -X GET 'https://api.twitch.tv/helix/teams/channel?broadcaster_id=96909659' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Client-Id: YOUR_CLIENT_ID'$headers = @{
"Authorization" = "Bearer YOUR_ACCESS_TOKEN"
"Client-Id" = "YOUR_CLIENT_ID"
}
$response = Invoke-RestMethod -Uri "https://api.twitch.tv/helix/teams/channel?broadcaster_id=96909659" `
-Method Get -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/teams/channel?broadcaster_id=96909659", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.twitch.tv/helix/teams/channel",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
params={
"broadcaster_id": "96909659",
},
)
data = response.json()req, _ := http.NewRequest("GET", "https://api.twitch.tv/helix/teams/channel?broadcaster_id=96909659", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("Client-Id", "YOUR_CLIENT_ID")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)$ch = curl_init("https://api.twitch.tv/helix/teams/channel?broadcaster_id=96909659");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Client-Id: YOUR_CLIENT_ID",
]);
$response = curl_exec($ch);
curl_close($ch);using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.twitch.tv/helix/teams/channel?broadcaster_id=96909659");
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN");
request.Headers.Add("Client-Id", "YOUR_CLIENT_ID");
var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();let client = reqwest::Client::new();
let response = client
.get("https://api.twitch.tv/helix/teams/channel?broadcaster_id=96909659")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;Response Example
{
"data": [
{
"broadcaster_id": "96909659",
"broadcaster_name": "CSharpFritz",
"broadcaster_login": "csharpfritz",
"background_image_url": null,
"banner": null,
"created_at": "2019-02-11T12:09:22Z",
"updated_at": "2020-11-18T15:56:41Z",
"info": "<p>An outgoing and enthusiastic group of friendly channels that write code, teach\nabout technology, and promote the technical community.</p>",
"thumbnail_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/team-livecoders-team_logo_image-bf1d9a87ca81432687de60e24ad9593d-600x600.png",
"team_name": "livecoders",
"team_display_name": "Live Coders",
"id": "6358"
}
]
}