NightDev Community Forums

Useful Custom APIs


Staff Edit: These APIs are broken. If the author comes back they can restore the thread.

Nightbot custom api for time following and viewers
Teak’s !HowLong Following Nightbot Command
New Subcount Variable?
Need Help with random Number Bot
Utilizing the $(twitch) variable always returns [Invalid Method]
Coin Flip Commands
!subage command for twitch channel
!8ball api for Nightbot
API call for latest follower?
Some NIGHTBOT Commands(How to create them)?
Subtime bot help
Randomising reply on single command
Longevity commands?
How do i make a followage command
Nightbot command options
Is there a way for me to do one or more of these 3 things?
Im cant find how to do greetings message on user "hi' -not working
[request] command for random link
Some aliases in one command
Error with Follow Command?
Teak’s !HowLong Following Nightbot Command
Utilizing the $(twitch) variable always returns [Invalid Method]

Can you create a API which shows how many followers the channel has?

How you use this command with Nightbot?


This should work:
!addcom !created $(customapi$(touser))
Then you can do “!created kdwolf77”

Added follower count, check original post.


Maybe a API which shows how long user has been a subscriber.


Alright, done - check the original post. Keep in mind that it requires an API token with the “channel_subscribers” permission. You can get a token at I’m working on lowering the amount of time it takes to get the subscription length; all tokens from that page will be faster than if you generated it on the previous link.


I wish there was easier way to retrieve playing song from Spotify, at the moment you can link your Spotify account to account and then make a Nightbot command for it. But time to time it doesn’t work at all.


Yeah. Unfortunately Spotify has not yet added ‘current track’ into their web API. I’m going to try and work with them to get that added as it would be very helpful for a lot of things.


Can you clarify what you mean by this statement? Is the failure on Spotify’s end, or is Nightbot not retrieving properly?


@rtainc While I appreciate your efforts to create custom APIs that consequently support Nightbot, asking people to sign up at a competing bot service isn’t really user friendly and, to be frank, seems a bit like bad intentions towards Nightbot. An appropriate solution here would have been to make a simple html + js page that uses Twitch’s implicit authentication flow to let users get their own access token, and then accept the access token directly via your API.


I agree – it was just the most convenient thing to give at the time. I’ve created a separate page and updated the post.

I believe what he meant was on LastFM’s API end, though I’ve never used it myself so I’m not sure how reliable it is.


This doesn’t seam to work for me! Thanks anyways!


Thanks for telling me – should be fixed now.


Can we get Nightbot uptime command to show seconds also like Moobot does?

Where I get the TOKEN for sub commands?


Tokens can be gotten from – the person with subscribers must be the one who connects there.

As for seconds in the uptime, just add &units=3 to the end of the URL. (Example: /uptime?user=kdwolf77&units=3)


User is not following <- I got that message when I tried the Token command.


I fixed the message to say “not subscribed.” Otherwise, the API should work fine. Make sure you’re correctly supplying the user name.

On a side note, I sped up the API.


Honestly though why do you need to know how many seconds a stream has been up? Also note you can’t check subscribers for other channels, only your own channel, provided you have subscribers.


the one for Gets how long USER has been following CHANNEL.

what do i put in the USER part of to make it that itll tell the time for whoever uses the command?




How would i do the entire correctly for my channel like how wizebot is?