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.
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.
Some of the most common questions
It creates a clip of the last 30 seconds.
No, that is not possible with the Twitch API.
No, that’s also not possible with the Twitch API.
Nope, that as well is not possible with the Twitch API.
” 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.
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.
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.
” 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.
” OAuth Token Expired! Update your Clip Command at: https://www.sowhoyou.com/clipcommand/ ”
OAuth tokens expire after 60 days, so this is normal. This message replaces: ” Must provide a valid Client-ID or OAuth token “
” 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.
” 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
Haven’t really started this, but it should be rather easy, I’m just lazy.
This probably will not happen, unless I think of a better way than I was gonna use.
Not sure many people would even use this, but I see how it could be useful.
In theory this is super easy to add, but I’m not motivated enough to add this yet.
The idea is to notify the streamer when things change with the api that could improve/remove things.
Things that may help you out
This will help avoid spam clips, duplicate clips, and api issues.
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.
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
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: https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
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.
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.
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.
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.