TwitchClipsRequests
Inherits: TwitchRequestBase < RefCounted < Object
Twitch Clips API for creating and retrieving video clips.
Description
TwitchClipsRequests provides methods for creating clips from live streams and retrieving existing clips. Creating clips requires clips:edit OAuth scope. Access through TwitchAPI.get_clips().
Tutorials
Methods
void |
create_clip(broadcaster_id: String, has_delay: bool = false) |
void |
get_clips(params: Dictionary) |
Method Descriptions
void create_clip(broadcaster_id: String, has_delay: bool = false) 🔗
Creates a clip from the broadcaster's live stream. Set has_delay to true to add a delay before capturing. Requires clips:edit scope. Results are returned via the TwitchAPI.request_completed signal with signal_name "clip_created".
Response includes: id (clip ID), edit_url (URL to edit the clip).
TwitchAPI.get_clips().create_clip("broadcaster_id", false)
# Response: {"data": [{"id": "AwkwardHelplessSalamanderSwiftRage", "edit_url": "https://clips.twitch.tv/AwkwardHelplessSalamanderSwiftRage/edit"}]}
void get_clips(params: Dictionary) 🔗
Gets clips filtered by various parameters. params can include broadcaster_id, game_id, id, started_at, ended_at, and first. Results are returned via the TwitchAPI.request_completed signal with signal_name "clips_received".
Response includes: Array of clips with id, url, embed_url, broadcaster_id/name, creator_id/name, video_id, game_id, language, title, view_count, created_at, thumbnail_url, duration, vod_offset.
var params = {"broadcaster_id": "123", "first": 10}
TwitchAPI.get_clips().get_clips(params)
# Response: {"data": [{"id": "AwkwardClip", "url": "https://clips.twitch.tv/...", "broadcaster_name": "MyChannel", "title": "Epic Moment", "view_count": 1500, "created_at": "2025-10-16T12:00:00Z", "duration": 30.5}]}