Nightbot !clip Command Setup for Twitch with Clipbot

You can connect a Nightbot !clip command to Clipbot. When someone uses the command during your live stream, Clipbot asks Twitch to create a clip and returns the Twitch clip URL in chat.
Clipbot keeps your Twitch access token in your connected account. The Nightbot command uses a separate, limited Clipbot API key, so you do not put a Twitch token in chat.
What you need
- A Clipbot account connected to Twitch
- Nightbot in your Twitch channel
- A live Twitch stream when you test the command
Twitch's Create Clip API requires the clips:edit permission and an active stream. Clipbot requests this permission when you connect your Twitch account.
1. Generate the Nightbot command response
- Open Clipbot.
- Go to Settings.
- Open Accounts.
- Find Nightbot clip command.
- Select Generate API key.
- Copy the complete command response.
Clipbot shows the key once. If you leave the page before you copy the response, generate a new key. A new key immediately stops the old command from working.
2. Add the command in Nightbot's dashboard
Do not paste the generated response into public Twitch chat. It contains your limited Clipbot API key.
- Sign in to Nightbot and open Commands → Custom.
- Select Add Command.
- Set the command to
!clip. - Paste the response that Clipbot generated into the message field. It has this structure:
$(urlfetch https://app.clipbot.tv/api/twitch/clips?api_key=YOUR_CLIPBOT_KEY&title=$(querystring))
- Set the cooldown to at least 30 seconds.
- Save the command.
Do not replace the generated key with a Twitch access token. Nightbot documents custom command management in its commands guide and documents remote responses in its urlfetch guide.
The cooldown reduces duplicate clips and stays below Clipbot's request limit.
3. Test the command
Start a Twitch stream, then enter:
!clip Great play
Nightbot should respond with a Twitch clip URL. Twitch creates clips asynchronously, so the clip page and preview can take a short time to become available.
The words after !clip become a Clipbot label after Twitch makes the new clip available. They do not change the title on Twitch.
What Clipbot does next
Clipbot retrieves the new clip from Twitch and adds it to your clips. Your existing automatic approval rules apply. If automatic approval is off, review the clip in Clipbot before you schedule or upload it.
The API key can only identify your Clipbot account for this clip-creation endpoint. Treat the command as private configuration because anyone with the key can request clips while your channel is live. Regenerate the key in Settings → Accounts if it is exposed.
Troubleshooting
Nightbot says the request is unauthorized
Generate a new command response in Settings → Accounts and replace the old response in Nightbot's dashboard. Confirm that you copied the complete response.
Twitch reports a permission error
Log out of Clipbot and sign in with Twitch again. This refreshes the connected account and requests the clips:edit permission.
Twitch cannot create the clip
Confirm that the channel is live. Twitch does not create a clip for an offline channel.
The command was used several times quickly
Wait before trying again. Clipbot rate-limits the endpoint, and the generated command includes a cooldown to prevent duplicate requests.
The clip URL appears before the clip is ready
Wait briefly and open the URL again. Twitch documents that clip creation is asynchronous. Clipbot retries while it waits for the new clip details.
Frequently Asked Questions
What does a Nightbot clip command do?
A Nightbot clip command lets viewers or moderators type !clip in chat to capture the last 30 seconds of your live stream. Nightbot sends the request to Clipbot, which uses Twitch's API to create the clip and returns the clip URL in chat.
Do I need to put a Twitch token in Nightbot?
No. Clipbot stores your Twitch access token securely in your connected account. The Nightbot command uses a separate Clipbot API key that only allows clip creation. This keeps your Twitch credentials out of chat.
What are the requirements for the command to work?
Your channel must be live, you need a Clipbot account connected to Twitch with the clips:edit permission, and Nightbot must be active in your channel. Generate the command in Clipbot at Settings → Accounts → Nightbot clip command.
Where do I generate the Nightbot command?
Sign in to Clipbot, go to Settings, open Accounts, find Nightbot clip command, and select Generate API key. Copy the complete response and paste it into Nightbot's custom command message field.
How do I add the clip command to Nightbot on Twitch?
Sign in to Nightbot's dashboard, go to Commands → Custom, select Add Command, set the command to !clip, paste the generated response from Clipbot into the message field, set a 30-second cooldown, and save. Never share this command response publicly as it contains your Clipbot API key. For more detailed setup instructions, see the step-by-step guide above.
What if my Nightbot clip command is not working?
Check that your channel is live, verify you copied the complete command response from Clipbot, ensure Nightbot is active in your channel, and confirm your Twitch account has the clips:edit permission. If the command says unauthorized, generate a new API key in Clipbot Settings → Accounts and update the Nightbot command. See the troubleshooting section for more common issues.
Related Guides
Looking for more ways to create and manage Twitch clips? Check out How to Make Clips on Twitch - Tools You Should Be Using for alternative clip methods including Stream Deck buttons and other chatbot options.
Once you have clips created, learn how to find and manage your Twitch clips in the Creator Dashboard, or discover how to upload Twitch clips to YouTube Shorts to grow your audience across platforms.