Twitch Clip Command — Let your viewers use the !clip command!

Generate a Chat Command that will Create Clips on your Twitch Channel!

I made the first clip command script that was ever made for Twitch, which was sadly limited to users who used the bot it was created for.
So it’s only right that I create a nice and easy to use API, so it could be used with nearly all bots. Because things shouldn’t be limited.

Currently supports chatbots such as, but not limited to: Phantombot, Pajbot, Nightbot, Streamlabs Chatbot (Ankhbot), Streamlabs Cloudbot, Scorpbot, Botisimo, StreamElements, Ohbot, Fossabot, Deepbot and any other Twitch Chatbot with ReadAPI functionality.

Notice: Clip Command API URL’s are Now Encrypted by default for your protection! However it is totally optional!
More info about how the Clip Command API URL Encryption works can be found in the Information Tab below.

Command Generator
Frequent Questions
Future Plans
Helpful Tips
Setup Guide

What channel do you want to clip?

Enabling Clip Thumbnail Generation is Not Recommended. This will not work with most cloud based bots.

Such as, Streamelements, Nightbot, Streamlabs Cloudbot and others. Disable this if you have any issues with your bot not responding!
The only bots I know for sure that Clip Thumbnail Generation will work for are: Phantombot and Pajbot. Almost all other bots will timeout.

See the Frequent Questions tab for a more detailed overview of what enabling thumbnail generation does.

Message from SOWHOYOUdotCOM

OAuth Tokens are Never Saved on Our Servers!
See the Information Tab for details about URL Encryption.

Documentation and Resources

Click Here to View/Edit the Clips Created on/via Your Channel.
Click Here to Review All Apps with Access to Your Account.

Some of the most common questions

What does this do?

It creates a clip of the last 30 seconds.

Can I change the length of the clip?

No, that is not possible with the Twitch API.

Can I name the clips when using the command?

No, that’s also not possible with the Twitch API.

Can the clips be created by the person who used the clip command?

Nope, that as well is not possible with the Twitch API.

What does this mean:
” Discord Webhook URL (Posts your Clips to your Discord Server) “

This allows you to post the clip to your discord server as well as your twitch chat.
To do this, simply go to your discord server, then create a webhook for where you want the clip posted.
You can set a custom name and image, those will not be overridden when the webhook is posted.

Why does Discord Post a Code Block with a link to the video and not the video itself.

This is something I am working on trying to find a way to fix. The reason for this is basically because the Twitch API sucks.
Basically, when the clip gets posted, the thumbnail is not ready yet, so it can’t show it.
This can be bypassed by using thumbnail generation, if enabled, the thumbnail should work in Discord.
However, by enabling thumbnail generation, this will break for most cloud bots, as explained below.

What does enabling thumbnail generation do?

It creates a loop, where it tries to ping the Twitch API to see if the clip exists.
That delays the posting of the clip in the chat, to give it a working thumbnail.
This has a fail safe cutoff at 20 seconds, but it should reply much sooner.
Typically it will take about 10 seconds for the clip to be verified.
This will not work for most cloud based bots, but you can try.
If needed, generate a new link and update the reply in your chatbot.

Why does it say:
” Clipping is not possible at this time! If the stream just went live or restarted, try again later. “

Chances are you just went live, try again in a few minutes. This message replaces: ” Clipping is not possible for an offline channel. ”
Or maybe you have the command made for the wrong channel. If so, try generating a new link and update the reply in your chatbot.

Why does it say:
” OAuth Token Expired! Update your Clip Command at: ”

OAuth tokens expire after 60 days, so this is normal. This message replaces: ” Must provide a valid Client-ID or OAuth token “

Why does Streamelements say:
” The remote server returned status code 408 Request Timeout “

This would be because you have enabled thumbnail generation.
Edit your API url, turn the “true” to “false” and that should fix it.

Why did my bot say:
” You’re seeing this message because you have thumbnail generation enabled and this is the first time you’ve used this API. If your next clip doesn’t work, disable thumbnail generation, because your bot doesn’t support it. <INSERT_CLIP_LINK_HERE> “

Well let’s be honest here, if you got that message, chances are you will never read this.
Just like you didn’t read anything else I typed on this page that would’ve prevented that message.
But basically, I’m just adding this message to the first time use of the api, if thumbnail generation is enabled.
After that, if you still can’t figure out how to get it working, or why it’s not working, then well… you should’ve read this page.

Things to expect in the future

A second command to see the last clips that were made.

Haven’t really started this, but it should be rather easy, I’m just lazy.

A third command to see how many clips have been created.

This probably will not happen, unless I think of a better way than I was gonna use.

Allow clips to be made silently with no reply in chat.

Not sure many people would even use this, but I see how it could be useful.

Add custom error messages for offline and other errors.

In theory this is super easy to add, but I’m not motivated enough to add this yet.

Add a option to display a message with the clip about new updates.

The idea is to notify the streamer when things change with the api that could improve/remove things.

Things that may help you out

Set a 15-30 second global cooldown for the clip command.

This will help avoid spam clips, duplicate clips, and api issues.

Take advantage of the options you can set when creating your clip command.

This could be anything from setting a currency (cost/reward) for creating clips, to user permissions.
Also you could also mention the command user with the api reply thanking them for clipping.

If you have any issues with the clip command not working with your bot.

First check the Frequent Questions or Information tabs, as the issue or question my be listed there.
Else, contact me is via Discord, Join My Server, or send me a DM: SoWhoYou#0420

Other information about this API

Clip Command API URL Encryption & How It Works!

This is kinda simple but not really, so I will make this as short and as simple to understand as possible.
Basically, I’m using a AES-256-OFB Encryption to hide the Twitch OAuth Token and Discord Webhook URL.
You can read more about what that means at:
Basically, your information is encrypted before you get your Clip Command API URL, then decrypted every time you make a clip.
The only way the OAuth Token or Webhook URL can be decrypted, is via the dual encryption keys stored on a secure server.
There is theoretically no way anyone will ever get your OAuth Token or Webhook URL even if they have your API URL.

Things that sadly can not be done simply due to the Twitch API limitations.

Name clips when the command is used. (ex: ‘!clip can not do’)
Make the command sender become the creator of the clip.
Change the length of the clip that will be created.

Enabling Clip Thumbnail Generation is Not Recommended.

This is simply because it does not work with most chatbots.
Other than that, it looks bad in chat, waiting up to 10-15 secs for reply.

If you’d like to show some support.

The best way would be to link people to this page.
Share it on your social media or link here in your Twitch Panels.

If you’re feeling really nice, you could always donate or subscribe.
Anyways, I just hope you enjoy the clip command, happy streaming!

Special thanks to ALazyMeme for the Video Guide!

If you’re someone who just want’s a basic rundown as quick as possible…

Copy the link for your bot, add it to your !clip command response, enjoy!

Here are some channels that use this API

I say some channels, because not all channels are listed here. Some channels have been filtered out for different reasons.
This auto updates every 15 mins or so. If your channel is listed here and you want it removed, please contact me.

Leave a Reply

Please Login to comment
2 Comment threads
0 Thread replies
Most reacted comment
Hottest comment thread
1 Comment authors
Recent comment authors
newest oldest most voted
Notify of
Do NOT follow this link or you will be banned from the site!