CreateClip

Create a Twitch Clip

Signature

public ClipData CreateClip(string title, int duration = 30)

Parameters

title
string

If null, will match the stream title at the time of creation.

duration
int

Clip duration in seconds (min. 5, max 60).

Return Type

Twitch.Common.Models.Api.ClipData

Example

using System;
using Twitch.Common.Models.Api; //Needed for ClipData Type
public class CPHInline
{
    public bool Execute()
    {
        //Create a 25 second clip titled "Example Title"
        ClipData clip = CPH.CreateClip("Example Title", 25); 
        //Access created clip data
        //Get clip creator name
        string creatorName = clip.CreatorName;
        //Get clip url
        string url = clip.Url;
        //Get clip game id
        string gameId = clip.GameId;

        return true;
    }
}