Get Channel Guest Star Settings
BetaGets the channel settings for configuration of the Guest Star feature for a particular host.
Endpoint
GEThttps://api.twitch.tv/helix/guest_star/channel_settings
Authorization
Requires one of the following:
- A user access token that includes the channel:read:guest_star or channel:manage:guest_star scope.For requests by the broadcaster (moderator_id matches broadcaster_id).
- A user access token that includes the moderator:read:guest_star or moderator:manage:guest_star scope.For requests by a moderator (moderator_id doesn't match broadcaster_id).
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster you want to get guest star settings for.moderator_idStringRequiredThe ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user ID in the user access token.
Response Body
dataObject[]A list that contains the channel's Guest Star settings.Hide child attributesShow child attributes
data.is_moderator_send_live_enabledBooleanFlag determining if Guest Star moderators have access to control whether a guest is live once assigned to a slot.data.slot_countIntegerNumber of slots the Guest Star call interface will allow the host to add to a call. Required to be between 1 and 6.data.is_browser_source_audio_enabledBooleanFlag determining if Browser Sources subscribed to sessions on this channel should output audiodata.group_layoutStringThis setting determines how the guests within a session should be laid out within the browser source. Layouts other than the ones listed here are reported as "TILED".Possible values
TILEDAll live guests are tiled within the browser source with the same size.SCREENSHAREAll live guests are tiled within the browser source with the same size. If there is an active screen share, it is sized larger than the other guests.
data.browser_source_tokenStringNullableView only token to generate browser source URLs. Is null if the user in moderator_id isn't the broadcaster.
Response Codes
- 200OK
- Successfully retrieved the Guest Star settings.
- 400Bad Request
- Missing broadcaster_id
- Missing moderator_id
- 401Unauthorized
- The ID in moderator_id must match the user ID in the user access token.
- The user access token must include the channel:read:guest_star or channel:manage:guest_star scope if moderator_id matches broadcaster_id, or the moderator:read:guest_star or moderator:manage:guest_star scope if it doesn't.
- 403Forbidden
- Insufficient authorization for viewing channel's Guest Star settings
curl -X GET 'https://api.twitch.tv/helix/guest_star/channel_settings' \
-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/guest_star/channel_settings" `
-Method Get -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/guest_star/channel_settings", {
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/guest_star/channel_settings",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("GET", "https://api.twitch.tv/helix/guest_star/channel_settings", 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/guest_star/channel_settings");
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/guest_star/channel_settings");
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/guest_star/channel_settings")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"is_moderator_send_live_enabled": true,
"slot_count": 4,
"is_browser_source_audio_enabled": true,
"group_layout": "TILED",
"browser_source_token": "eihq8rew7q3hgierufhi3q"
}
]
}Update Channel Guest Star Settings
BetaMutates the channel settings for configuration of the Guest Star feature for a particular host.
Query parameter broadcaster_id must match the user_id in the User-Access token
Endpoint
PATCHhttps://api.twitch.tv/helix/guest_star/channel_settings
Authorization
Requires one of the following:
- A user access token that includes the channel:manage:guest_star scope.
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster you want to update Guest Star settings for.
Request Body
is_moderator_send_live_enabledBooleanFlag determining if Guest Star moderators have access to control whether a guest is live once assigned to a slot.slot_countIntegerNumber of slots the Guest Star call interface will allow the host to add to a call. Required to be between 1 and 6.is_browser_source_audio_enabledBooleanFlag determining if Browser Sources subscribed to sessions on this channel should output audiogroup_layoutStringThis setting determines how the guests within a session should be laid out within the browser source.Possible values
TILEDAll live guests are tiled within the browser source with the same size.SCREENSHAREAll live guests are tiled within the browser source with the same size. If there is an active screen share, it is sized larger than the other guests.
regenerate_browser_sourcesBooleanFlag determining if Guest Star should regenerate the auth token associated with the channel's browser sources. Providing a true value for this will immediately invalidate all browser sources previously configured in your streaming software.
Response Codes
- 204No Content
- Successfully updated channel settings
- 400Bad Request
- Missing broadcaster_id
- Invalid slot_count
- Invalid group_layout
- The body includes no setting to update, and regenerate_browser_sources isn't true
- 401Unauthorized
- The ID in broadcaster_id must match the user ID in the user access token.
curl -X PATCH 'https://api.twitch.tv/helix/guest_star/channel_settings' \
-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/guest_star/channel_settings" `
-Method Patch -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/guest_star/channel_settings", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.patch(
"https://api.twitch.tv/helix/guest_star/channel_settings",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("PATCH", "https://api.twitch.tv/helix/guest_star/channel_settings", 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/guest_star/channel_settings");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
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.Patch, "https://api.twitch.tv/helix/guest_star/channel_settings");
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
.patch("https://api.twitch.tv/helix/guest_star/channel_settings")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;Get Guest Star Invites
BetaProvides the caller with a list of pending invites to a Guest Star session.
Query parameter moderator_id must match the user_id in the User-Access token
Endpoint
GEThttps://api.twitch.tv/helix/guest_star/invites
Authorization
Requires one of the following:
- A user access token that includes the channel:read:guest_star or channel:manage:guest_star scope.For requests by the broadcaster (moderator_id matches broadcaster_id).
- A user access token that includes the moderator:read:guest_star or moderator:manage:guest_star scope.For requests by a moderator (moderator_id doesn't match broadcaster_id).
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster running the Guest Star session.moderator_idStringRequiredThe ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user_id in the user access token.session_idStringRequiredThe session ID to query for invite status.
Response Body
dataInvite[]A list of invite objects describing the invited users.Hide child attributesShow child attributes
data.user_idStringTwitch User ID corresponding to the invited guestdata.invited_atStringTimestamp when the invite was created or last updated.data.statusStringStatus representing the invited user's join state. The list includes only users still in the "INVITED" state.Possible values
INVITEDThe user has been invited to the session but has not acknowledged it.
data.is_video_enabledBooleanFlag signaling that the invited user has chosen to disable their local video device. The user has hidden themselves, but they may choose to reveal their video feed upon joining the session.data.is_audio_enabledBooleanFlag signaling that the invited user has chosen to disable their local audio device. The user has muted themselves, but they may choose to unmute their audio feed upon joining the session.data.is_video_availableBooleanFlag signaling that the invited user has a video device available for sharing.data.is_audio_availableBooleanFlag signaling that the invited user has an audio device available for sharing.
Response Codes
- 200OK
- Successfully retrieved the broadcaster's Guest Star invites.
- 400Bad Request
- Missing broadcaster_id
- Missing moderator_id
- Missing session_id
- Invalid session_id
- 401Unauthorized
- The ID in moderator_id must match the user ID in the user access token.
- The user access token must include the channel:read:guest_star or channel:manage:guest_star scope if moderator_id matches broadcaster_id, or the moderator:read:guest_star or moderator:manage:guest_star scope if it doesn't.
- 403Forbidden
- The user specified in the 'moderator_id' is not permitted to view the broadcaster's invites.
curl -X GET 'https://api.twitch.tv/helix/guest_star/invites' \
-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/guest_star/invites" `
-Method Get -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/guest_star/invites", {
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/guest_star/invites",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("GET", "https://api.twitch.tv/helix/guest_star/invites", 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/guest_star/invites");
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/guest_star/invites");
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/guest_star/invites")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"user_id": "144601104",
"invited_at": "2023-01-02T04:16:53Z",
"status": "INVITED",
"is_audio_enabled": false,
"is_video_enabled": true,
"is_audio_available": true,
"is_video_available": true
}
]
}Send Guest Star Invite
BetaSends an invite to a specified guest on behalf of the broadcaster for a Guest Star session in progress.
Endpoint
POSThttps://api.twitch.tv/helix/guest_star/invites
Authorization
Requires one of the following:
- A user access token that includes the channel:manage:guest_star scope.For requests by the broadcaster (moderator_id matches broadcaster_id).
- A user access token that includes the moderator:manage:guest_star scope.For requests by a moderator (moderator_id doesn't match broadcaster_id).
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster running the Guest Star session.moderator_idStringRequiredThe ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user_id in the user access token.session_idStringRequiredThe session ID for the invite to be sent on behalf of the broadcaster.guest_idStringRequiredTwitch User ID for the guest to invite to the Guest Star session.
Response Codes
- 204No Content
- Successfully sent the Guest Star invite
- 400Bad Request
- Missing broadcaster_id
- Missing moderator_id
- Missing session_id
- Missing guest_id
- Invalid session_id
- Guest already invited, or already assigned a slot in the session
- Session reached the limit of unaccepted invites
- 401Unauthorized
- The ID in moderator_id must match the user ID in the user access token.
- The user access token must include the channel:manage:guest_star scope if moderator_id matches broadcaster_id, or the moderator:manage:guest_star scope if it doesn't.
- 403Forbidden
- Unauthorized guest invited
- Guest has a suspension on their account
curl -X POST 'https://api.twitch.tv/helix/guest_star/invites' \
-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/guest_star/invites" `
-Method Post -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/guest_star/invites", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.post(
"https://api.twitch.tv/helix/guest_star/invites",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("POST", "https://api.twitch.tv/helix/guest_star/invites", 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/guest_star/invites");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
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.Post, "https://api.twitch.tv/helix/guest_star/invites");
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
.post("https://api.twitch.tv/helix/guest_star/invites")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;Delete Guest Star Invite
BetaRevokes a previously sent invite for a Guest Star session.
Endpoint
DELETEhttps://api.twitch.tv/helix/guest_star/invites
Authorization
Requires one of the following:
- A user access token that includes the channel:manage:guest_star scope.For requests by the broadcaster (moderator_id matches broadcaster_id).
- A user access token that includes the moderator:manage:guest_star scope.For requests by a moderator (moderator_id doesn't match broadcaster_id).
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster running the Guest Star session.moderator_idStringRequiredThe ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user_id in the user access token.session_idStringRequiredThe ID of the session for the invite to be revoked on behalf of the broadcaster.guest_idStringRequiredTwitch User ID for the guest to revoke the Guest Star session invite from.
Response Codes
- 204No Content
- Successfully deleted the Guest Star invite
- 400Bad Request
- Missing broadcaster_id
- Missing moderator_id
- Missing session_id
- Missing guest_id
- Invalid session_id
- 401Unauthorized
- The ID in moderator_id must match the user ID in the user access token.
- The user access token must include the channel:manage:guest_star scope if moderator_id matches broadcaster_id, or the moderator:manage:guest_star scope if it doesn't.
- 403Forbidden
- The user specified in 'moderator_id' is not permitted to delete invites for the broadcaster.
- 404Not Found
- No invite exists for specified guest_id
curl -X DELETE 'https://api.twitch.tv/helix/guest_star/invites' \
-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/guest_star/invites" `
-Method Delete -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/guest_star/invites", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.delete(
"https://api.twitch.tv/helix/guest_star/invites",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("DELETE", "https://api.twitch.tv/helix/guest_star/invites", 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/guest_star/invites");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
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.Delete, "https://api.twitch.tv/helix/guest_star/invites");
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
.delete("https://api.twitch.tv/helix/guest_star/invites")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;Get Guest Star Session
BetaGets information about an ongoing Guest Star session for a particular channel.
Guests must be either invited or assigned a slot within the session
Endpoint
GEThttps://api.twitch.tv/helix/guest_star/session
Authorization
Requires one of the following:
- A user access token that includes the channel:read:guest_star or channel:manage:guest_star scope.For requests by the broadcaster (moderator_id matches broadcaster_id).
- A user access token that includes the moderator:read:guest_star or moderator:manage:guest_star scope.For requests by a moderator (moderator_id doesn't match broadcaster_id).
Query Parameters
broadcaster_idStringRequiredID for the user hosting the Guest Star session.moderator_idStringRequiredThe ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user ID in the user access token.
Response Body
dataSession[]Summary of the session details. The list is empty if the broadcaster has no active session, or if the user in moderator_id isn't the broadcaster, a guest or invited user in the session, or one of the broadcaster's Guest Star moderators.Hide child attributesShow child attributes
data.idStringID uniquely representing the Guest Star session.data.guestsObject[]List of guests currently interacting with the Guest Star session.Hide child attributesShow child attributes
data.guests.slot_idStringID representing this guest's slot assignment.
-
Host is in slot "0", except when the user in moderator_id holds a guest slot in the session. Slots are then numbered from that guest's point of view, with the guest in slot "0".
-
Guests are assigned the following consecutive IDs (e.g, "1", "2", "3", etc)
-
Screen Share is represented as a special guest with the ID "SCREENSHARE"
-
The identifier here matches the ID referenced in browser source links used in broadcasting software.
-
data.guests.is_liveBooleanFlag determining whether or not the guest is visible in the browser source in the host's streaming software.data.guests.user_idStringUser ID of the guest assigned to this slot.data.guests.volumeIntegerValue from 0 to 100 representing the host's volume setting for this guest.data.guests.assigned_atStringTimestamp when this guest was assigned a slot in the session.data.guests.audioObjectInformation about the guest's audio settingsHide child attributesShow child attributes
data.guests.audio.is_host_enabledBooleanFlag determining whether the host is allowing the guest's audio to be seen or heard within the session.data.guests.audio.is_guest_enabledBooleanFlag determining whether the guest is allowing their audio to be transmitted to the session.data.guests.audio.is_availableBooleanFlag determining whether the guest has an appropriate audio device available to be transmitted to the session.
data.guests.videoObjectInformation about the guest's video settingsHide child attributesShow child attributes
data.guests.video.is_host_enabledBooleanFlag determining whether the host is allowing the guest's video to be seen or heard within the session.data.guests.video.is_guest_enabledBooleanFlag determining whether the guest is allowing their video to be transmitted to the session.data.guests.video.is_availableBooleanFlag determining whether the guest has an appropriate video device available to be transmitted to the session.
Response Codes
- 200OK
- Successfully retrieved the Guest Star session.
- 400Bad Request
- Missing broadcaster_id
- Missing moderator_id
- 401Unauthenticated
- The ID in moderator_id must match the user ID in the user access token.
- The user access token must include the channel:read:guest_star or channel:manage:guest_star scope if moderator_id matches broadcaster_id, or the moderator:read:guest_star or moderator:manage:guest_star scope if it doesn't.
curl -X GET 'https://api.twitch.tv/helix/guest_star/session' \
-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/guest_star/session" `
-Method Get -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/guest_star/session", {
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/guest_star/session",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("GET", "https://api.twitch.tv/helix/guest_star/session", 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/guest_star/session");
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/guest_star/session");
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/guest_star/session")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"id": "2KFRQbFtpmfyD3IevNRnCzOPRJI",
"guests": [
{
"slot_id": "0",
"user_id": "9321049",
"is_live": true,
"volume": 100,
"assigned_at": "2023-01-02T04:16:53Z",
"audio": {
"is_available": true,
"is_host_enabled": true,
"is_guest_enabled": true
},
"video": {
"is_available": true,
"is_host_enabled": true,
"is_guest_enabled": true
}
},
{
"slot_id": "1",
"user_id": "144601104",
"is_live": true,
"volume": 100,
"assigned_at": "2023-01-02T04:20:59Z",
"audio": {
"is_available": true,
"is_host_enabled": true,
"is_guest_enabled": true
},
"video": {
"is_available": true,
"is_host_enabled": true,
"is_guest_enabled": true
}
}
]
}
]
}Create Guest Star Session
BetaRequires the broadcaster to be present in the call interface. The session ends automatically when no one in it is connected to the call interface, for example, if the broadcaster doesn't join after creating the session. If guests are connected but the broadcaster isn't, the broadcaster is removed from their slot and the session continues until the last participant leaves.
Query parameter broadcaster_id must match the user_id in the User-Access token
Endpoint
POSThttps://api.twitch.tv/helix/guest_star/session
Authorization
Requires one of the following:
- A user access token that includes the channel:manage:guest_star scope.
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster you want to create a Guest Star session for. Provided broadcaster_id must match the user_id in the authentication token.
Response Body
dataSession[]Summary of the session details.Hide child attributesShow child attributes
data.idStringID uniquely representing the Guest Star session.data.guestsObject[]List of guests currently interacting with the Guest Star session. On creation, the session will contain the broadcaster as a solo guest.Hide child attributesShow child attributes
data.guests.slot_idStringID representing this guest's slot assignment.
-
Host is always in slot "0"
-
Guests are assigned the following consecutive IDs (e.g, "1", "2", "3", etc)
-
Screen Share is represented as a special guest with the ID "SCREENSHARE"
-
The identifier here matches the ID referenced in browser source links used in broadcasting software.
-
data.guests.is_liveBooleanFlag determining whether or not the guest is visible in the browser source in the host's streaming software.data.guests.user_idStringUser ID of the guest assigned to this slot.data.guests.volumeIntegerValue from 0 to 100 representing the host's volume setting for this guest.data.guests.assigned_atStringTimestamp when this guest was assigned a slot in the session.data.guests.audioObjectInformation about the guest's audio settingsHide child attributesShow child attributes
data.guests.audio.is_host_enabledBooleanFlag determining whether the host is allowing the guest's audio to be seen or heard within the session.data.guests.audio.is_guest_enabledBooleanFlag determining whether the guest is allowing their audio to be transmitted to the session.data.guests.audio.is_availableBooleanFlag determining whether the guest has an appropriate audio device available to be transmitted to the session.
data.guests.videoObjectInformation about the guest's video settingsHide child attributesShow child attributes
data.guests.video.is_host_enabledBooleanFlag determining whether the host is allowing the guest's video to be seen or heard within the session.data.guests.video.is_guest_enabledBooleanFlag determining whether the guest is allowing their video to be transmitted to the session.data.guests.video.is_availableBooleanFlag determining whether the guest has an appropriate video device available to be transmitted to the session.
Response Codes
- 200OK
- Successfully started the Guest Star session.
- 400Bad Request
- Missing broadcaster_id
- Session limit reached (1 active call)
- 401Unauthorized
- The ID in broadcaster_id must match the user ID in the user access token.
- Phone verification missing
- 403Forbidden
- Insufficient authorization for creating session
curl -X POST 'https://api.twitch.tv/helix/guest_star/session' \
-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/guest_star/session" `
-Method Post -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/guest_star/session", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.post(
"https://api.twitch.tv/helix/guest_star/session",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("POST", "https://api.twitch.tv/helix/guest_star/session", 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/guest_star/session");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
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.Post, "https://api.twitch.tv/helix/guest_star/session");
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
.post("https://api.twitch.tv/helix/guest_star/session")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"id": "2KFRQbFtpmfyD3IevNRnCzOPRJI",
"guests": [
{
"slot_id": "0",
"user_id": "9321049",
"is_live": true,
"volume": 100,
"assigned_at": "2023-01-02T04:16:53Z",
"audio": {
"is_available": true,
"is_host_enabled": true,
"is_guest_enabled": true
},
"video": {
"is_available": true,
"is_host_enabled": true,
"is_guest_enabled": true
}
}
]
}
]
}End Guest Star Session
BetaPerforms the same action as if the host clicked the "End Call" button in the Guest Star UI. Programmatically ends a Guest Star session on behalf of the broadcaster.
Query parameter broadcaster_id must match the user_id in the User-Access token
Endpoint
DELETEhttps://api.twitch.tv/helix/guest_star/session
Authorization
Requires one of the following:
- A user access token that includes the channel:manage:guest_star scope.
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster you want to end a Guest Star session for. Provided broadcaster_id must match the user_id in the authentication token.session_idStringRequiredID for the session to end on behalf of the broadcaster.
Response Body
dataSession[]Summary of the session details when the session was ended.Hide child attributesShow child attributes
data.idStringID uniquely representing the Guest Star session.data.guestsObject[]List of guests currently interacting with the Guest Star session.Hide child attributesShow child attributes
data.guests.slot_idStringID representing this guest's slot assignment.
-
Host is always in slot "0"
-
Guests are assigned the following consecutive IDs (e.g, "1", "2", "3", etc)
-
Screen Share is represented as a special guest with the ID "SCREENSHARE"
-
The identifier here matches the ID referenced in browser source links used in broadcasting software.
-
data.guests.is_liveBooleanFlag determining whether or not the guest is visible in the browser source in the host's streaming software.data.guests.user_idStringUser ID of the guest assigned to this slot.data.guests.volumeIntegerValue from 0 to 100 representing the host's volume setting for this guest.data.guests.assigned_atStringTimestamp when this guest was assigned a slot in the session.data.guests.audioObjectInformation about the guest's audio settingsHide child attributesShow child attributes
data.guests.audio.is_host_enabledBooleanFlag determining whether the host is allowing the guest's audio to be seen or heard within the session.data.guests.audio.is_guest_enabledBooleanFlag determining whether the guest is allowing their audio to be transmitted to the session.data.guests.audio.is_availableBooleanFlag determining whether the guest has an appropriate audio device available to be transmitted to the session.
data.guests.videoObjectInformation about the guest's video settingsHide child attributesShow child attributes
data.guests.video.is_host_enabledBooleanFlag determining whether the host is allowing the guest's video to be seen or heard within the session.data.guests.video.is_guest_enabledBooleanFlag determining whether the guest is allowing their video to be transmitted to the session.data.guests.video.is_availableBooleanFlag determining whether the guest has an appropriate video device available to be transmitted to the session.
Response Codes
- 200OK
- Successfully ended the Guest Star session.
- 400Bad Request
- Missing broadcaster_id
- Missing or invalid session_id
- Session has already been ended
- 401Unauthorized
- The ID in broadcaster_id must match the user ID in the user access token.
- 403Forbidden
- Insufficient authorization for ending session
curl -X DELETE 'https://api.twitch.tv/helix/guest_star/session' \
-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/guest_star/session" `
-Method Delete -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/guest_star/session", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.delete(
"https://api.twitch.tv/helix/guest_star/session",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("DELETE", "https://api.twitch.tv/helix/guest_star/session", 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/guest_star/session");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
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.Delete, "https://api.twitch.tv/helix/guest_star/session");
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
.delete("https://api.twitch.tv/helix/guest_star/session")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;{
"data": [
{
"id": "2KFRQbFtpmfyD3IevNRnCzOPRJI",
"guests": [
{
"slot_id": "0",
"user_id": "9321049",
"is_live": true,
"volume": 100,
"assigned_at": "2023-01-02T04:16:53Z",
"audio": {
"is_available": true,
"is_host_enabled": true,
"is_guest_enabled": true
},
"video": {
"is_available": true,
"is_host_enabled": true,
"is_guest_enabled": true
}
}
]
}
]
}Assign Guest Star Slot
BetaAllows a previously invited user to be assigned a slot within the active Guest Star session, once that guest has indicated they are ready to join.
Endpoint
POSThttps://api.twitch.tv/helix/guest_star/slot
Authorization
Requires one of the following:
- A user access token that includes the channel:manage:guest_star scope.For requests by the broadcaster (moderator_id matches broadcaster_id).
- A user access token that includes the moderator:manage:guest_star scope.For requests by a moderator (moderator_id doesn't match broadcaster_id).
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster running the Guest Star session.moderator_idStringRequiredThe ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user_id in the user access token.session_idStringRequiredThe ID of the Guest Star session in which to assign the slot.guest_idStringRequiredThe Twitch User ID corresponding to the guest to assign a slot in the session. This user must already have an invite to this session, and have indicated that they are ready to join.slot_idStringRequiredThe slot assignment to give to the user. Must be a numeric identifier between "1" and "N" where N is the max number of slots for the session. Max number of slots allowed for the session is reported by Get Channel Guest Star Settings. If another guest already holds the slot, that guest is removed from the slot and replaced.
Response Codes
- 204No Content
- Successfuly assigned guest to slot
- 400Bad Request
- Missing broadcaster_id
- Missing moderator_id
- Missing guest_id
- Missing or invalid session_id
- Missing or invalid slot_id
- 401Unauthorized
- The ID in moderator_id must match the user ID in the user access token.
- The user access token must include the channel:manage:guest_star scope if moderator_id matches broadcaster_id, or the moderator:manage:guest_star scope if it doesn't.
- moderator_id is not a guest star moderator
- Cannot assign host slot
- 403Forbidden
- Guest not invited to session
- Guest already assigned to slot
- Guest is not ready to join
curl -X POST 'https://api.twitch.tv/helix/guest_star/slot' \
-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/guest_star/slot" `
-Method Post -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/guest_star/slot", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.post(
"https://api.twitch.tv/helix/guest_star/slot",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("POST", "https://api.twitch.tv/helix/guest_star/slot", 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/guest_star/slot");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
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.Post, "https://api.twitch.tv/helix/guest_star/slot");
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
.post("https://api.twitch.tv/helix/guest_star/slot")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;Update Guest Star Slot
BetaAllows a user to update the assigned slot for a particular user within the active Guest Star session.
Endpoint
PATCHhttps://api.twitch.tv/helix/guest_star/slot
Authorization
Requires one of the following:
- A user access token that includes the channel:manage:guest_star scope.For requests by the broadcaster (moderator_id matches broadcaster_id).
- A user access token that includes the moderator:manage:guest_star scope.For requests by a moderator (moderator_id doesn't match broadcaster_id).
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster running the Guest Star session.moderator_idStringRequiredThe ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user_id in the user access token.session_idStringRequiredThe ID of the Guest Star session in which to update slot settings.source_slot_idStringRequiredThe slot assignment previously assigned to a user.destination_slot_idStringRequiredThe slot to move this user assignment to. If the destination slot is occupied, the user assigned will be swapped into 'source_slot_id'.
Response Codes
- 204No Content
- Successfuly updated slot(s)
- 400Bad Request
- Missing broadcaster_id
- Missing session_id
- Missing source_slot_id
- Missing destination_slot_id
- source_slot_id or destination_slot_id is not a guest slot ("1" through "5")
- 401Unauthorized
- The ID in moderator_id must match the user ID in the user access token.
- The user access token must include the channel:manage:guest_star scope if moderator_id matches broadcaster_id, or the moderator:manage:guest_star scope if it doesn't.
- 403Forbidden
- The user in moderator_id isn't in the session, and isn't the broadcaster or one of the broadcaster's Guest Star moderators
- 404Not Found
- session_id not found, or the session has ended
curl -X PATCH 'https://api.twitch.tv/helix/guest_star/slot' \
-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/guest_star/slot" `
-Method Patch -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/guest_star/slot", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.patch(
"https://api.twitch.tv/helix/guest_star/slot",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("PATCH", "https://api.twitch.tv/helix/guest_star/slot", 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/guest_star/slot");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
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.Patch, "https://api.twitch.tv/helix/guest_star/slot");
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
.patch("https://api.twitch.tv/helix/guest_star/slot")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;Delete Guest Star Slot
BetaAllows a caller to remove a slot assignment from a user participating in an active Guest Star session. This revokes their access to the session immediately and disables their access to publish or subscribe to media within the session.
Endpoint
DELETEhttps://api.twitch.tv/helix/guest_star/slot
Authorization
Requires one of the following:
- A user access token that includes the channel:manage:guest_star scope.For requests by the broadcaster (moderator_id matches broadcaster_id).
- A user access token that includes the moderator:manage:guest_star scope.For requests by a moderator (moderator_id doesn't match broadcaster_id).
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster running the Guest Star session.moderator_idStringRequiredThe ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user ID in the user access token.session_idStringRequiredThe ID of the Guest Star session in which to remove the slot assignment.guest_idStringRequiredThe Twitch User ID corresponding to the guest to remove from the session.slot_idStringRequiredThe slot ID representing the slot assignment to remove from the session.should_reinvite_guestBooleanFlag signaling that the guest should be reinvited to the session, sending them back to the invite queue.
Response Codes
- 204No Content
- Successfuly removed user from slot
- 400Bad Request
- Missing broadcaster_id
- Missing moderator_id
- Missing or invalid session_id
- Missing guest_id
- Missing or invalid slot_id
- 401Unauthorized
- The ID in moderator_id must match the user ID in the user access token.
- The user access token must include the channel:manage:guest_star scope if moderator_id matches broadcaster_id, or the moderator:manage:guest_star scope if it doesn't.
- 403Forbidden
- moderator_id is not a Guest Star moderator
- The request is attempting to modify a restricted slot
- 404Not Found
- The user in guest_id doesn't have a slot in the session
curl -X DELETE 'https://api.twitch.tv/helix/guest_star/slot' \
-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/guest_star/slot" `
-Method Delete -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/guest_star/slot", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.delete(
"https://api.twitch.tv/helix/guest_star/slot",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("DELETE", "https://api.twitch.tv/helix/guest_star/slot", 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/guest_star/slot");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
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.Delete, "https://api.twitch.tv/helix/guest_star/slot");
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
.delete("https://api.twitch.tv/helix/guest_star/slot")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;Update Guest Star Slot Settings
BetaAllows a user to update slot settings for a particular guest within a Guest Star session, such as allowing the user to share audio or video within the call as a host. These settings will be broadcasted to all subscribers which control their view of the guest in that slot. One or more of the optional parameters to this API can be specified at any time.
Endpoint
PATCHhttps://api.twitch.tv/helix/guest_star/slot_settings
Authorization
Requires one of the following:
- A user access token that includes the channel:manage:guest_star scope.For requests by the broadcaster (moderator_id matches broadcaster_id).
- A user access token that includes the moderator:manage:guest_star scope.For requests by a moderator (moderator_id doesn't match broadcaster_id).
Query Parameters
broadcaster_idStringRequiredThe ID of the broadcaster running the Guest Star session.moderator_idStringRequiredThe ID of the broadcaster or a user that has permission to moderate the broadcaster's chat room. This ID must match the user ID in the user access token.session_idStringRequiredThe ID of the Guest Star session in which to update a slot's settings.slot_idStringRequiredThe slot assignment that has previously been assigned to a user.is_audio_enabledBooleanFlag indicating whether the slot is allowed to share their audio with the rest of the session. If false, the slot will be muted in any views containing the slot.is_video_enabledBooleanFlag indicating whether the slot is allowed to share their video with the rest of the session. If false, the slot will have no video shared in any views containing the slot.is_liveBooleanFlag indicating whether the user assigned to this slot is visible/can be heard from any public subscriptions. Generally, this determines whether or not the slot is enabled in any broadcasting software integrations.
Response Codes
- 204No Content
- Successfuly updated slot settings
- 400Bad Request
- Missing broadcaster_id
- Missing moderator_id
- Missing or invalid session_id <li>Missing or invalid slot_id
- At least one of is_audio_enabled, is_video_enabled, or is_live is required
- 401Unauthorized
- The ID in moderator_id must match the user ID in the user access token.
- The user access token must include the channel:manage:guest_star scope if moderator_id matches broadcaster_id, or the moderator:manage:guest_star scope if it doesn't.
- 403Forbidden
- moderator_id is not a Guest Star moderator
- The request is attempting to modify a restricted slot
- Moderators can't set is_live to true when the broadcaster's is_moderator_send_live_enabled setting is false
curl -X PATCH 'https://api.twitch.tv/helix/guest_star/slot_settings' \
-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/guest_star/slot_settings" `
-Method Patch -Headers $headersconst response = await fetch("https://api.twitch.tv/helix/guest_star/slot_settings", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
});
const data = await response.json();import requests
response = requests.patch(
"https://api.twitch.tv/helix/guest_star/slot_settings",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Client-Id": "YOUR_CLIENT_ID",
},
)
data = response.json()req, _ := http.NewRequest("PATCH", "https://api.twitch.tv/helix/guest_star/slot_settings", 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/guest_star/slot_settings");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
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.Patch, "https://api.twitch.tv/helix/guest_star/slot_settings");
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
.patch("https://api.twitch.tv/helix/guest_star/slot_settings")
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("Client-Id", "YOUR_CLIENT_ID")
.send()
.await?;
let data = response.text().await?;