guest_star - YoYoGames/GMEXT-Twitch GitHub Wiki

Guest Star

Functions

These are the functions of this module:



Back To Top

twitch_guest_star_get_channel_guest_star_settings

Twitch Endpoint: Get Channel Guest Star Settings

This function gets the channel settings for configuration of the Guest Star feature for a particular host.

  • Parameter moderator_id must match the user_id in the User-Access token
  • Requires TWITCH_SCOPE: TWITCH_SCOPE_CHANNEL_READ_GUEST_STAR, TWITCH_SCOPE_CHANNEL_MANAGE_GUEST_STAR, TWITCH_SCOPE_MODERATOR_READ_GUEST_STAR or TWITCH_SCOPE_MODERATOR_MANAGE_GUEST_STAR

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_guest_star_get_channel_guest_star_settings(optionals, callback_success, callback_failed)
Argument Type Description
optionals Struct The optional parameters to be passed into the function:

- broadcaster_id : String : The ID of the broadcaster you want to get guest star settings for.
- moderator_id : String : The 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.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

These members are returned in the success callback:

Member Type Description
is_moderator_send_live_enabled Boolean Flag determining if Guest Star moderators have access to control whether a guest is live once assigned to a slot.
slot_count Real Number 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_enabled Boolean Flag determining if Browser Sources subscribed to sessions on this channel should output audio
group_layout String This setting determines how the guests within a session should be laid out within the browser source. Can be one of the following values: "TILED_LAYOUT": All live guests are tiled within the browser source with the same size. "SCREENSHARE_LAYOUT": All 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.
browser_source_token String View only token to generate browser source URLs

Failure Callback

This method is triggered on failure.




Back To Top

twitch_guest_star_update_channel_guest_star_settings

Twitch Endpoint: Update Channel Guest Star Settings

This function mutates the channel settings for configuration of the Guest Star feature for a particular host.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_guest_star_update_channel_guest_star_settings(broadcaster_id, optionals, callback_success, callback_failed)
Argument Type Description
broadcaster_id String The ID of the broadcaster you want to update Guest Star settings for.
optionals Struct The optional parameters to be passed into the function:

- is_moderator_send_live_enabled : Boolean : Flag determining if Guest Star moderators have access to control whether a guest is live once assigned to a slot.
- slot_count : Real : Number 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_enabled : Boolean : Flag determining if Browser Sources subscribed to sessions on this channel should output audio
- group_layout : String : This setting determines how the guests within a session should be laid out within the browser source. Can be one of the following values: "TILED_LAYOUT": All live guests are tiled within the browser source with the same size. "SCREENSHARE_LAYOUT": All 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. "HORIZONTAL_LAYOUT": All live guests are arranged in a horizontal bar within the browser source. "VERTICAL_LAYOUT": All live guests are arranged in a vertical bar within the browser source.
- regenerate_browser_sources : Boolean : Flag 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.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

This method is triggered on success. It has no response body.


Failure Callback

This method is triggered on failure.




Back To Top

twitch_guest_star_get_guest_star_session

Twitch Endpoint: Get Guest Star Session

This function gets information about an ongoing Guest Star session for a particular channel.

  • Requires TWITCH_SCOPE: TWITCH_SCOPE_CHANNEL_READ_GUEST_STAR, TWITCH_SCOPE_CHANNEL_MANAGE_GUEST_STAR, TWITCH_SCOPE_MODERATOR_READ_GUEST_STAR or TWITCH_SCOPE_MODERATOR_MANAGE_GUEST_STAR
  • Guests must be either invited or assigned a slot within the session

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_guest_star_get_guest_star_session(broadcaster_id, moderator_id, callback_success, callback_failed)
Argument Type Description
broadcaster_id String ID for the user hosting the Guest Star session.
moderator_id String The 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.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

These members are returned in the success callback:

Member Type Description
data Array Summary of the session details
 ├── id String ID uniquely representing the Guest Star session.
 ├── guests Array List of guests currently interacting with the Guest Star session.
         ├── slot_id String ID 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.
         ├── is_live Boolean Flag determining whether or not the guest is visible in the browser source in the host's streaming software.
         ├── user_id String User ID of the guest assigned to this slot.
         ├── user_display_name String Display name of the guest assigned to this slot.
         ├── user_login String Login of the guest assigned to this slot.
         ├── volume Real Value from 0 to 100 representing the host's volume setting for this guest.
         ├── assigned_at String Timestamp when this guest was assigned a slot in the session.
         ├── audio_settings Struct Information about the guest's audio settings
                 ├── is_host_enabled Boolean Flag determining whether the host is allowing the guest's audio to be seen or heard within the session.
                 ├── is_guest_enabled Boolean Flag determining whether the guest is allowing their audio to be transmitted to the session.
                 └── is_available Boolean Flag determining whether the guest has an appropriate audio device available to be transmitted to the session.
         └── video_settings Struct Information about the guest's video settings
                 ├── is_host_enabled Boolean Flag determining whether the host is allowing the guest's video to be seen or heard within the session.
                 ├── is_guest_enabled Boolean Flag determining whether the guest is allowing their video to be transmitted to the session.
                 └── is_available Boolean Flag determining whether the guest has an appropriate video device available to be transmitted to the session.

Failure Callback

This method is triggered on failure.




Back To Top

twitch_guest_star_create_guest_star_session

Twitch Endpoint: Create Guest Star Session

This function programmatically creates a Guest Star session on behalf of the broadcaster. Requires the broadcaster to be present in the call interface, or the call will be ended automatically.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_guest_star_create_guest_star_session(broadcaster_id, callback_success, callback_failed)
Argument Type Description
broadcaster_id String The ID of the broadcaster you want to create a Guest Star session for. Provided broadcaster_id must match the user_id in the auth token.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

These members are returned in the success callback:

Member Type Description
data Array Summary of the session details.
 ├── id String ID uniquely representing the Guest Star session.
 ├── guests Struct List of guests currently interacting with the Guest Star session. On creation, the session will contain the broadcaster as a solo guest.
         ├── slot_id String ID 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.
         ├── is_live Boolean Flag determining whether or not the guest is visible in the browser source in the host's streaming software.
         ├── user_id String User ID of the guest assigned to this slot.
         ├── user_display_name String Display name of the guest assigned to this slot.
         ├── user_login String Login of the guest assigned to this slot.
         ├── volume Real Value from 0 to 100 representing the host's volume setting for this guest.
         ├── assigned_at String Timestamp when this guest was assigned a slot in the session.
         ├── audio_settings Struct Information about the guest's audio settings
                 ├── is_host_enabled Boolean Flag determining whether the host is allowing the guest's audio to be seen or heard within the session.
                 ├── is_guest_enabled Boolean Flag determining whether the guest is allowing their audio to be transmitted to the session.
                 └── is_available Boolean Flag determining whether the guest has an appropriate audio device available to be transmitted to the session.
         └── video_settings Struct Information about the guest's video settings
                 ├── is_host_enabled Boolean Flag determining whether the host is allowing the guest's video to be seen or heard within the session.
                 ├── is_guest_enabled Boolean Flag determining whether the guest is allowing their video to be transmitted to the session.
                 └── is_available Boolean Flag determining whether the guest has an appropriate video device available to be transmitted to the session.

Failure Callback

This method is triggered on failure.




Back To Top

twitch_guest_star_end_guest_star_session

Twitch Endpoint: End Guest Star Session

This function programmatically ends a Guest Star session on behalf of the broadcaster. Performs the same action as if the host clicked the "End Call" button in the Guest Star UI.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_guest_star_end_guest_star_session(broadcaster_id, session_id, callback_success, callback_failed)
Argument Type Description
broadcaster_id String The ID of the broadcaster you want to end a Guest Star session for. Provided broadcaster_id must match the user_id in the auth token.
session_id String ID for the session to end on behalf of the broadcaster.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

These members are returned in the success callback:

Member Type Description
data Array Summary of the session details when the session was ended.
 ├── id String ID uniquely representing the Guest Star session.
 ├── guests Array List of guests currently interacting with the Guest Star session.
         ├── slot_id String ID 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.
         ├── is_live Boolean Flag determining whether or not the guest is visible in the browser source in the host's streaming software.
         ├── user_id String User ID of the guest assigned to this slot.
         ├── user_display_name String Display name of the guest assigned to this slot.
         ├── user_login String Login of the guest assigned to this slot.
         ├── volume Real Value from 0 to 100 representing the host's volume setting for this guest.
         ├── assigned_at String Timestamp when this guest was assigned a slot in the session.
         ├── audio_settings Struct Information about the guest's audio settings
                 ├── is_host_enabled Boolean Flag determining whether the host is allowing the guest's audio to be seen or heard within the session.
                 ├── is_guest_enabled Boolean Flag determining whether the guest is allowing their audio to be transmitted to the session.
                 └── is_available Boolean Flag determining whether the guest has an appropriate audio device available to be transmitted to the session.
         └── video_settings Struct Information about the guest's video settings
                 ├── is_host_enabled Boolean Flag determining whether the host is allowing the guest's video to be seen or heard within the session.
                 ├── is_guest_enabled Boolean Flag determining whether the guest is allowing their video to be transmitted to the session.
                 └── is_available Boolean Flag determining whether the guest has an appropriate video device available to be transmitted to the session.

Failure Callback

This method is triggered on failure.




Back To Top

twitch_guest_star_get_guest_star_invites

Twitch Endpoint: Get Guest Star Invites

This function provides the caller with a list of pending invites to a Guest Star session, including the invitee's ready status while joining the waiting room.

  • Parameter broadcaster_id must match the user_id in the User-Access token
  • Requires TWITCH_SCOPE: TWITCH_SCOPE_CHANNEL_READ_GUEST_STAR, TWITCH_SCOPE_CHANNEL_MANAGE_GUEST_STAR, TWITCH_SCOPE_MODERATOR_READ_GUEST_STAR or TWITCH_SCOPE_MODERATOR_MANAGE_GUEST_STAR

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_guest_star_get_guest_star_invites(broadcaster_id, moderator_id, session_id, callback_success, callback_failed)
Argument Type Description
broadcaster_id String The ID of the broadcaster running the Guest Star session.
moderator_id String The 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_id String The session ID to query for invite status.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

These members are returned in the success callback:

Member Type Description
data Array A list of invite structs describing the invited user as well as their ready status.
 ├── user_id String Twitch User ID corresponding to the invited guest
 ├── invited_at String Timestamp when this user was invited to the session.
 ├── status String Status representing the invited user's join state. Can be one of the following: "INVITED": The user has been invited to the session but has not acknowledged it. "ACCEPTED": The invited user has acknowledged the invite and joined the waiting room, but may still be setting up their media devices or otherwise preparing to join the call. "READY": The invited user has signaled they are ready to join the call from the waiting room.
 ├── is_video_enabled Boolean Flag 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.
 ├── is_audio_enabled Boolean Flag 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.
 ├── is_video_available Boolean Flag signaling that the invited user has a video device available for sharing.
 └── is_audio_available Boolean Flag signaling that the invited user has an audio device available for sharing.

Failure Callback

This method is triggered on failure.




Back To Top

twitch_guest_star_send_guest_star_invite

Twitch Endpoint: Send Guest Star Invite

This function sends an invite to a specified guest on behalf of the broadcaster for a Guest Star session in progress.

  • Parameter moderator_id must match the user_id in the User-Access token
  • Requires TWITCH_SCOPE: TWITCH_SCOPE_CHANNEL_MANAGE_GUEST_STAR or TWITCH_SCOPE_MODERATOR_MANAGE_GUEST_STAR

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_guest_star_send_guest_star_invite(broadcaster_id, moderator_id, session_id, guest_id, callback_success, callback_failed)
Argument Type Description
broadcaster_id String The ID of the broadcaster running the Guest Star session.
moderator_id String The 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_id String The session ID for the invite to be sent on behalf of the broadcaster.
guest_id String Twitch User ID for the guest to invite to the Guest Star session.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

This method is triggered on success. It has no response body.


Failure Callback

This method is triggered on failure.




Back To Top

twitch_guest_star_delete_guest_star_invite

Twitch Endpoint: Delete Guest Star Invite

This function revokes a previously sent invite for a Guest Star session.

  • Parameter moderator_id must match the user_id in the User-Access token
  • Requires TWITCH_SCOPE: TWITCH_SCOPE_CHANNEL_MANAGE_GUEST_STAR or TWITCH_SCOPE_MODERATOR_MANAGE_GUEST_STAR

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_guest_star_delete_guest_star_invite(broadcaster_id, moderator_id, session_id, guest_id, callback_success, callback_failed)
Argument Type Description
broadcaster_id String The ID of the broadcaster running the Guest Star session.
moderator_id String The 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_id String The ID of the session for the invite to be revoked on behalf of the broadcaster.
guest_id String Twitch User ID for the guest to revoke the Guest Star session invite from.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

This method is triggered on success. It has no response body.


Failure Callback

This method is triggered on failure.




Back To Top

twitch_guest_star_assign_guest_star_slot

Twitch Endpoint: Assign Guest Star Slot

This function allows 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.

  • Parameter moderator_id must match the user_id in the User-Access token
  • Requires TWITCH_SCOPE: TWITCH_SCOPE_CHANNEL_MANAGE_GUEST_STAR or TWITCH_SCOPE_MODERATOR_MANAGE_GUEST_STAR

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_guest_star_assign_guest_star_slot(broadcaster_id, moderator_id, session_id, guest_id, slot_id, callback_success, callback_failed)
Argument Type Description
broadcaster_id String The ID of the broadcaster running the Guest Star session.
moderator_id String The 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_id String The ID of the Guest Star session in which to assign the slot.
guest_id String The 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_id String The 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 twitch_guest_star_get_channel_guest_star_settings.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

This method is triggered on success. It has no response body.


Failure Callback

This method is triggered on failure.




Back To Top

twitch_guest_star_update_guest_star_slot

Twitch Endpoint: Update Guest Star Slot

This function allows a user to update the assigned slot for a particular user within the active Guest Star session.

  • Parameter moderator_id must match the user_id in the User-Access token
  • Requires TWITCH_SCOPE: TWITCH_SCOPE_CHANNEL_MANAGE_GUEST_STAR or TWITCH_SCOPE_MODERATOR_MANAGE_GUEST_STAR

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_guest_star_update_guest_star_slot(broadcaster_id, moderator_id, session_id, source_slot_id, destination_slot_id, callback_success, callback_failed)
Argument Type Description
broadcaster_id String The ID of the broadcaster running the Guest Star session.
moderator_id String The 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_id String The ID of the Guest Star session in which to update slot settings.
source_slot_id String The slot assignment previously assigned to a user.
destination_slot_id String The slot to move this user assignment to. If the destination slot is occupied, the user assigned will be swapped into source_slot_id.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

This method is triggered on success. It has no response body.


Failure Callback

This method is triggered on failure.




Back To Top

twitch_guest_star_delete_guest_star_slot

Twitch Endpoint: Delete Guest Star Slot

This function allows 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.

  • Parameter moderator_id must match the user_id in the User-Access token
  • Requires TWITCH_SCOPE: TWITCH_SCOPE_CHANNEL_MANAGE_GUEST_STAR or TWITCH_SCOPE_MODERATOR_MANAGE_GUEST_STAR

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_guest_star_delete_guest_star_slot(broadcaster_id, moderator_id, session_id, guest_id, slot_id, should_reinvite_guest, callback_success, callback_failed)
Argument Type Description
broadcaster_id String The ID of the broadcaster running the Guest Star session.
moderator_id String The 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_id String The ID of the Guest Star session in which to remove the slot assignment.
guest_id String The Twitch User ID corresponding to the guest to remove from the session.
slot_id String The slot ID representing the slot assignment to remove from the session.
should_reinvite_guest Boolean Flag signaling that the guest should be reinvited to the session, sending them back to the invite queue.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

This method is triggered on success. It has no response body.


Failure Callback

This method is triggered on failure.




Back To Top

twitch_guest_star_update_guest_star_slot_settings

Twitch Endpoint: Update Guest Star Slot Settings

This function allows 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.

  • Parameter moderator_id must match the user_id in the User-Access token
  • Requires TWITCH_SCOPE: TWITCH_SCOPE_CHANNEL_MANAGE_GUEST_STAR or TWITCH_SCOPE_MODERATOR_MANAGE_GUEST_STAR

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_guest_star_update_guest_star_slot_settings(broadcaster_id, moderator_id, session_id, slot_id, optionals, callback_success, callback_failed)
Argument Type Description
broadcaster_id String The ID of the broadcaster running the Guest Star session.
moderator_id String The 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_id String The ID of the Guest Star session in which to update a slot's settings.
slot_id String The slot assignment that has previously been assigned to a user.
optionals Struct The optional parameters to be passed into the function:

- is_audio_enabled : Boolean : Flag 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_enabled : Boolean : Flag 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_live : Boolean : Flag 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.
- volume : Real : Value from 0-100 that controls the audio volume for shared views containing the slot.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

This method is triggered on success. It has no response body.


Failure Callback

This method is triggered on failure.



⚠️ **GitHub.com Fallback** ⚠️