(views) or similar command variable



Please add a variable called (views) or similar that retrieves the total number of caster’s channel views. Filing as a feature request as I could not find it in the command variable list, forums back to 2017, or feature requests.

Thank you!



Cause you couldn’t find the variable list: Command Variables

You can also use (customapijson https://api.twitch.tv/kraken/channels/NAME?clientID=CLIENTID {This streamer currently hat total} views)


Thanks, @dungi. I actually did find the variable list and searched the variable list and there is not a variable for channel views. There is one for channel viewers but that’s not what I’m looking for, hence the feature request.

I didn’t know customapijson was a thing tho, I will have to look into that, thank you for sharing it with me!


just curious as to why you would like the bot to post in chat how many views you’ve had?
I can just as easily go to my Twitch Dashboard, Phantombot Beta Panel, or my own channel and look. In fact while I stream, the dashboard is open.
Not calling you out or anything, just looking for a practical reason for this request. Hope the custom helped you.


@Khryztoepher, when I had Nightbot some of my viewers asked me for a !stats command that lists off numbers for followers, current viewers, channel views, and subscribers in chat. PhantomBot has premade variables for all of that except channel views.

Also @dungi I checked into using the Twitch API with (customapijson). Won’t work but thank you for the suggestion. It won’t work because (customapijson) doesn’t include a way to state the client ID as a request header, it only puts the client ID directly in the request which doesn’t work with get-channel. See Channels Reference


You can use this for now, but we will look into adding a variable for this.

(customapijson https://api.twitch.tv/kraken/channels/CHANNEL_NAME?client_id=CLIENT_ID {This streamer currently has a total of} views {views})

Where CLIENT_ID is the Client ID to use, example:



Ah I didn’t realize there had to be an underscore between client and ID for that to work I legitimately thought it had to be in the request header and could not be in the actual request, thank you @ScaniaTV!

addcom views Channel views: (views)
[06-10-2018 @ 11:49:03.098 MDT] [MUTED] Channel views: 402
[06-10-2018 @ 11:49:05.286 MDT] [MUTED] Channel views: 402

PR 2007