Tutorials
Nightbot
Use your regular Trophy Case award URL with Nightbot. No separate key, activation step, or Nightbot-specific daily quota is needed.
Fastest setup
Open your trophy in Manage Trophies, then choose Nightbot under Award with a web request → Basic → Choose your bot. Copy the prepared value: your keys, trophy code, and username variable are already filled in. Follow the steps shown there. The manual instructions below are an alternative, not additional required steps. For an unmodified URL used by those manual instructions, choose Default / Manual Setup.
Before you begin
- Connect your Twitch account to Trophy Case and create a trophy.
- Add Nightbot to the trophy owner’s Twitch channel.
- Viewers must sign in to Trophy Case and add your shelf before receiving trophies.
Create a command
- Open Manage Trophies and select a trophy.
- Under Award with a web request, open Basic and copy the regular award URL.
- In the Nightbot dashboard, select Commands → Custom → Add Command.
- Choose a command name, such as !trophy. In Message, wrap the copied URL in
$(urlfetch ...)and replaceTWITCH_USERNAMEwith$(user), as shown below. - Set Userlevel to whoever should be allowed to use it. Choose a cooldown and save.
This command awards the person who runs it:
$(urlfetch https://trophycase.gg/a/AWARD_ID/AWARD_SECRET/TROPHY_CODE/$(user))
The URL is the same one used by your other bots. Nightbot’s $(user) supplies the caller’s Twitch username. For a public claim command, set Userlevel to Everyone; use a more restricted level when appropriate.
Award a named viewer instead
Replace $(user) with $(touser) in the command message:
$(urlfetch https://trophycase.gg/a/AWARD_ID/AWARD_SECRET/TROPHY_CODE/$(touser))
You can then run:
!trophy twitch_username
Use a username without @. Set Userlevel to Moderator if only you and your moderators should be able to award other people. Nightbot controls these permissions.
What happens
Nightbot reports that the trophy was awarded, is already owned, or that the viewer needs to add your shelf. Repeated requests do not duplicate awards. Banned accounts and removed or disabled trophies remain blocked.
Timers can use a fixed recipient username in the same URL; they do not need a caller header. The timer must run in the trophy owner’s channel.
Keep your Award Secret private
The command contains your regular Award Secret. Paste it directly into the dashboard. Do not post it in Twitch chat with !commands add or !commands edit. Do not publish the raw command in screenshots, command lists, or shared documents.
If the secret is exposed, change it under Settings → Award Keys and update every bot command using it. Nightbot server verification protects GET access; a leaked secret could still be used through the regular POST API.
How GET requests are protected
Trophy Case checks the Award Secret, verifies that the request’s source IP belongs to Nightbot using both reverse and forward DNS, and checks that the command ran in the trophy owner’s Twitch channel. Headers alone are not enough. If verification fails or DNS is unavailable, no trophy is awarded.
This follows Nightbot’s published server-verification guidance. Successful DNS checks are cached briefly to avoid a lookup on every award.
Normal shared request limits still apply to protect the server. There are no separate per-trophy Nightbot keys or daily quotas. Your existing POST automations continue working as before.
Troubleshooting
- Invalid award URL or secret: Copy the regular award URL again from the trophy’s Basic tab. Check whether the Award Secret was changed.
- Nightbot verification failed: Make sure the command runs in the trophy owner’s Twitch channel. Retry shortly if there is a temporary DNS problem.
- Opening the URL in a browser does not work: That is intentional. Run it through Nightbot; browser navigation, prefetching, and HEAD requests cannot award trophies.
- Viewer needs to add your shelf: Ask them to sign in and add your shelf, then retry.
- Too many requests: Increase the command cooldown and retry shortly. The regular server limit applies across requests sharing a source IP.
- Moving from the old Nightbot setup: Replace the old
nb_command with the regular award URL shown in the Basic tab. The separate Nightbot keys have been retired.
Nightbot’s UrlFetch documentation explains the URL request and its plain-text response. The User variable identifies the caller; ToUser supplies a named recipient.