Miscellaneous
Makes a Twitch API Call to the specified Twitch API URL.
Works like the HTTP Request command, but automatically creates a header for Twitch API Calls. Convenient!
| Box Name | Type | Description |
|---|---|---|
| URL | String | The URL to make the API Call to |
| Method | Dropdown | The Method used for the API Call |
| Login Name | Dropdown | The name of the channel to use for authentication for the API Call |
| Save Variable As (optional) | String | Variable to save the result |
Saved Payload:
SAMMI saves the parsed JSON response returned by the Twitch API endpoint you call. The exact object depends on the URL and method.
| Value | Type | Description |
|---|---|---|
| savedVariable | Object | Full JSON response object returned by Twitch for the requested endpoint. |
| undefined | Undefined | Saved if Twitch is not connected, the URL/method/account is invalid, Twitch returns an error, or the response cannot be parsed as JSON. |
Twitch API: This command can target any Twitch Helix API endpoint. Specify the full URL (e.g. https://api.twitch.tv/helix/streams) and the appropriate HTTP method. Authentication headers are added automatically using the selected login’s OAuth token and SAMMI’s client ID.
| Request Component | Type | Description |
|---|---|---|
| URL | string | Full Twitch Helix API URL including any query parameters (e.g. https://api.twitch.tv/helix/streams?user_login=username). |
| Method | string | HTTP method for the request: GET, POST, PATCH, DELETE, etc. |
| Authorization | string | Bearer token — added automatically from the selected login’s OAuth token. |
| client-id | string | SAMMI’s client ID — added automatically to the request header. |
Creates a header object used for manual Twitch API Calls. Can be used in conjunction with the HTTP Request command.
| Box Name | Type | Description |
|---|---|---|
| Login Name | Dropdown | The name of the channel to use for authentication in the API Header |
| Save Variable As | String | Variable to save the result |
Saved Payload:
| Variable | Type | Contents |
|---|---|---|
| Authorization | String | “Bearer (your OAuth token)” |
| client-id | String | SAMMI’s unique identifier |
| Content-Type | String | “application/json” |
Twitch API: The header object produced by this command is compatible with any Twitch Helix API endpoint. Pass it as the Header parameter in the HTTP Request command.
| Header Field | Type | Description |
|---|---|---|
| Authorization | string | Bearer <token> — the OAuth token for the selected login, used to authenticate all Twitch API requests. |
| client-id | string | SAMMI’s registered Twitch application client ID, required by all Twitch API requests. |
| Content-Type | string | application/json — tells the Twitch API to expect a JSON body on POST/PATCH requests. |
Creates a new clip. For more information on creating clips, check out the Twitch API Reference Guide for Create Clip.
| Box Name | Type | Description |
|---|---|---|
| Login Name | Dropdown | Your Twitch login name (all lowercase characters) to create the clip for. |
| Clip Title | String | Optional title to apply to the created clip. |
| Clip Duration | Number | Optional clip duration in seconds. Must be between 5 and 60 seconds. |
| Save Variable As (optional) | String | Variable to save your newly created clip ID. |
Saved Value:
| Value | Type | Description |
|---|---|---|
| savedVariable | String | ID of the newly created clip (data[0].id). |
| undefined | Undefined | Saved if Twitch is not connected, the channel cannot be resolved, required scopes are missing, Twitch returns an empty response, or the request fails. |
clips:edit Twitch scope.
Twitch API Endpoint: POST /helix/clips
| Request Field | Type | Description |
|---|---|---|
| broadcaster_id | string | The ID of the broadcaster whose stream you want to create a clip from. |
| has_delay | boolean | When true, adds a delay before the clip is captured (accounts for the typical stream delay). Default: false. |
Response Fields:
| Response Field | Type | Description |
|---|---|---|
| data[0].id | string | The ID of the clip that was created. Saved as the command’s output variable. |
| data[0].edit_url | string | The URL of the Twitch webpage where the user can edit the clip. |
Creates a marker in your stream. Your stream must be live.
A marker is an arbitrary point in a stream that the broadcaster wants to mark; e.g., to easily return to later.
The marker is created at the current timestamp in the live broadcast when the request is processed.
| Box Name | Type | Description |
|---|---|---|
| Login Name | Dropdown | Your Twitch login name (all lowercase characters) |
| Description | String | Description of or comments on the marker. Max length is 140 characters. |
Twitch API Endpoint: POST /helix/streams/markers
| Request Field | Type | Description |
|---|---|---|
| user_id | string | The ID of the broadcaster in whose live stream the marker is created. |
| description | string | A short description of the marker to help you remember why you created it. Maximum: 140 characters. |
Gets videos from a Twitch channel.
Available types of videos:
- All Videos
- Archives
- Highlights
- Uploads
- Clips
If ‘All Videos’ is selected, the response will not contain ‘Clips’. The response received, depending on the size of the request, will require some time to load, so please ensure you use a ‘Wait Until Variable Exists’ command with this one.
| Box Name | Type | Description |
|---|---|---|
| Channel | Dropdown | Twitch channel to get videos from. This can be left empty. |
| Type | Dropdown | Dropdown of video types that can be received from Twitch. |
| Save Variable As | String | Name of the variable to save the response as. |
Saved Payload:
SAMMI saves the full response object returned by Twitch. For Clips, data contains clip objects. For all other video types, data contains video objects.
| Variable Name | Type | Description |
|---|---|---|
| data | Array | Array of video or clip objects returned by Twitch. |
data[0-?].id |
String | Video or clip ID. |
data[0-?].user_id |
String | Twitch User ID of the broadcaster or video owner. |
data[0-?].user_login |
String | Login name of the broadcaster or video owner. |
data[0-?].user_name |
String | Display name of the broadcaster or video owner. |
data[0-?].title |
String | Video or clip title. |
data[0-?].url |
String | Twitch URL for the video or clip. |
data[0-?].thumbnail_url |
String | Thumbnail URL. |
data[0-?].created_at |
String | Time in Twitch format when the video or clip was created. |
data[0-?].view_count |
Number | View count, if Twitch returns it for the selected type. |
data[0-?].duration |
String | Video duration for video responses. |
data[0-?].type |
String | Video type for video responses. |
| pagination | Object | Pagination data, if Twitch returns more pages. |
Twitch API Endpoints:
GET /helix/videos — used for All Videos, Archives, Highlights, and Uploads types.
GET /helix/clips — used for the Clips type.
| Query Parameter | Type | Description |
|---|---|---|
| user_id | string | The ID of the broadcaster whose videos or clips to retrieve. |
| type | string | Filters video results by type. Possible values: all, archive, highlight, upload. Not applicable for clips. |
| first | integer | Maximum number of items to return per page. |
Returns the status of a user for one of your linked channels. The response will return either true or false.
Available status types:
- Check Subscriber
- Check Mod
- Check VIP
- Check Follower
| Box Name | Type | Description |
|---|---|---|
| Channel | Dropdown | Twitch channel to get a user’s status for. This can be left empty. |
| User Name | String | User Name of the user to get the status for. |
| Type | Dropdown | Use the dropdown menu to choose the status type. |
| Save Variable As | String | Name of the variable to save the response as. |
Saved Value:
| Value | Type | Description |
|---|---|---|
| true | Boolean | The selected user has the requested status for the selected channel. |
| false | Boolean | The selected user does not have the requested status for the selected channel. |
| undefined | Undefined | Saved if Twitch is not connected, the channel/user cannot be resolved, required scopes are missing, or the request fails. |
Twitch API Endpoints:
| Status Type | Endpoint | Description |
|---|---|---|
| Check Subscriber | GET /helix/subscriptions/user |
Checks whether a specified user is subscribed to the broadcaster’s channel. |
| Check Mod | GET /helix/moderation/moderators |
Checks whether a specified user is a moderator in the broadcaster’s channel. |
| Check VIP | GET /helix/channels/vips |
Checks whether a specified user has VIP status in the broadcaster’s channel. |
| Check Follower | GET /helix/channels/followers |
Checks whether a specified user is following the broadcaster’s channel. |
| Query Parameter | Type | Description |
|---|---|---|
| broadcaster_id | string | The ID of the broadcaster’s channel to check against. |
| user_id | string | The ID of the user to check. |
Retrieves a list of all your active EventSub subscriptions.
| Box Name | Type | Description |
|---|---|---|
| Save Variable As | String | Variable to save the result |
Saved Payload:
SAMMI saves the full enabled EventSub subscriptions response returned by Twitch.
| Variable Name | Type | Description |
|---|---|---|
| data | Array | Array of active EventSub subscription objects. |
data[0-?].id |
String | Subscription ID. |
data[0-?].status |
String | Subscription status. |
data[0-?].type |
String | EventSub subscription type. |
data[0-?].version |
String | EventSub subscription version. |
data[0-?].condition |
Object | Condition object for the subscription. |
data[0-?].transport |
Object | Transport configuration for the subscription. |
data[0-?].created_at |
String | Time in Twitch format when the subscription was created. |
data[0-?].cost |
Number | Cost of the subscription. |
| total | Number | Total number of matching subscriptions. |
| total_cost | Number | Total cost of active subscriptions. |
| max_total_cost | Number | Maximum total subscription cost allowed by Twitch. |
| pagination | Object | Pagination data, if Twitch returns more pages. |
Twitch API Endpoint: GET /helix/eventsub/subscriptions
| Query Parameter | Type | Description |
|---|---|---|
| status | string | SAMMI filters by enabled to retrieve only active subscriptions. |
Create custom Twitch EventSub subscriptions. This lets you subscribe to any Twitch EventSub event, that way you don’t have to wait for a new SAMMI update to get access to new EventSub events.
| Box Name | Type | Description |
|---|---|---|
| Subscription Type | String | The Event to subscribe to. Must be dot notation, for example automod.message.hold |
| Version | Number | The version of the Event you wish to Subscribe, this is found next to the event name in the Twitch Documentation |
Twitch API Endpoint: POST /helix/eventsub/subscriptions
| Request Field | Type | Description |
|---|---|---|
| type | string | The subscription type in dot notation (e.g. automod.message.hold). |
| version | string | The version of the subscription type. |
| condition | object | An object containing the subscription-specific conditions (e.g. broadcaster_user_id). Required fields vary by subscription type. |
| transport | object | The transport method. SAMMI uses WebSocket transport with the active session ID. |
Deletes a custom Twitch EventSub subscription. This lets you unsubscribe from any Twitch EventSub event.
| Box Name | Type | Description |
|---|---|---|
| EventSub Subscription Id | String | The internal Id referencing this subscription. |
Twitch API Endpoint: DELETE /helix/eventsub/subscriptions
| Request Field | Type | Description |
|---|---|---|
| id | string | The ID of the EventSub subscription to delete. Retrieve this using the Get Active EventSub Subscriptions command. |
Gets ad schedule information for the specified Twitch channel. For more information on what the response contains, check out the Response Body table in the Twitch API Reference Guide for Get Ad Schedule.
| Box Name | Type | Description |
|---|---|---|
| Channel | Dropdown | Twitch channel to get the ad schedule from. This can be left empty to use the default account. |
| Save Variable As | String | Variable name to save the response as. |
Saved Payload:
SAMMI saves the first ad schedule object returned by Twitch (data[0]).
| Variable Name | Type | Description |
|---|---|---|
| next_ad_at | String | Time in Twitch format when the next scheduled ad starts. |
| last_ad_at | String | Time in Twitch format when the previous ad started. |
| duration | Number | Duration of the scheduled ad in seconds. |
| preroll_free_time | Number | Remaining preroll-free time in seconds. |
| snooze_count | Number | Number of available snoozes. |
| snooze_refresh_at | String | Time in Twitch format when a snooze becomes available again. |
channel:read:ads Twitch scope.
Twitch API Endpoint: GET /helix/channels/ads
| Query Parameter | Type | Description |
|---|---|---|
| broadcaster_id | string | The ID of the broadcaster whose ad schedule to retrieve. |
Snoozes the next automatic mid-roll ad for the specified Twitch channel. For more information on what the response contains, check out the Response Body table in the Twitch API Reference Guide for Snooze Next Ad.
| Box Name | Type | Description |
|---|---|---|
| Channel | Dropdown | Twitch channel to snooze the next ad for. This can be left empty to use the default account. |
| Save Variable As | String | Variable name to save the response as. |
Saved Payload:
SAMMI saves the first snooze result object returned by Twitch (data[0]).
| Variable Name | Type | Description |
|---|---|---|
| snooze_count | Number | Number of available snoozes after this command. |
| snooze_refresh_at | String | Time in Twitch format when a snooze becomes available again. |
| next_ad_at | String | Time in Twitch format when the next scheduled ad starts after the snooze. |
channel:read:ads Twitch scope.
Twitch API Endpoint: POST /helix/channels/ads/schedule/snooze
| Request Field | Type | Description |
|---|---|---|
| broadcaster_id | string | The ID of the broadcaster whose next scheduled ad to snooze. |