Hitbox Chat Information -- Unofficial

Information on what Hitbox Chat Client sends and receives.


Common Information - Broadcaster Information - Moderator Information - User Information

Poll Information - Sticky Information - Giveaway Information - Subscriber Information

Server Information - Viewers Number Info


New documentation: Click Here - Web API

Some Useful Links:

Ingest API (No Auth Required)

WebSocket Server List

Common Information

This section contains common info that you might need.

Ping

Received every few seconds. You must respond with a Pong

2::

Pong

Sent when you received a ping. (If you do not, it will kick you from the chat server.)

2::

Join Channel (joinChannel)

Sent when you join a channel. Always use lower case channel names. The name value determines the casing of your username.

5:::{"name":"message","args":[{"method":"joinChannel","params":{"channel":"hitakashi","name":"Hitakashi","token":"","isAdmin":true}}]}

Leave Channel (partChannel)

Sent when you want to part a channel. Always use lower case channel names.

5:::{"name":"message","args":[{"method":"partChannel","params":{"channel":"hitakashi","name":"Hitakashi"}}]}

Informational Messages (infoMsg)

Received on mod/unmod/ban/unban/timeout. Some actions dictate who can view them. Valid Actions: ban, kicked, isAdmin

5:::{"name":"message","args":[{"method":"infoMsg","params":{"text":"You have added Hitabot as a moderator","channel":"hitakashi","timestamp":1402039745,"action":"isAdmin"}}]}

Chat Message (chatMsg)

Messages are limited to 255 characters.

Sent and Received on every chat message. Includes image if broadcaster or subscriber.

Sent

5:::{"name":"message","args":[{"method":"chatMsg","params":{"channel":"hitakashi","name":"Hitakashi","nameColor":"FA58F4","text":"haha"}}]}

Received buffer and buffersent are only sent on scrollback messages when you join a channel.

5:::{"name":"message","args":[{"method":"chatMsg","params":{"channel":"hitakashi","name":"Hitakashi","nameColor":"4B9188","text":"haha","time":1421041488,"role":"admin","isFollower":true,"isSubscriber":false,"isOwner":true,"isStaff":false,"isCommunity":false,"media":false,"image":"/static/img/channel/Hitakashi_53f4e837eb388_small.png","buffer":true,"buffersent":true}}]}

Chat Message - Cannot Chat. (Subscriber Only Mode)

Received from the server. When you send a chatMsg you usually get another chatMsg back as basically a confirmation. This won't happen and instead get a infoMsg. This is only sent on external WebSocket connections. The website javascript locally handles Sub Only mode.

5:::{"name":"message","args":[{"method":"infoMsg","params":{"text":"Subscriber only chat active.","channel":"theebstream","timestamp":1407017266,"action":""}}]}

Login Message

Received from the server. This is received when ever you successfully authenticate with the server.

5:::{"name":"message","args":[{"method":"loginMsg","params":{"channel":"hitakashi","name":"hitakashi","role":"admin"}}]}

Login to chat as a guest (Anonymous)

Received from chat while logged out of an account or when you want to login anonymously. (CANNOT CHAT)

5:::{"name":"message","args":[{"method":"loginMsg","params":{"channel":"hitakashi","name":"UnknownSoldier","role":"guest"}}]}

Join channel while a guest (Anonymous)

Sent while logged out of an account or anonymous login. (CANNOT CHAT)

5:::{"name":"message","args":[{"method":"joinChannel","params":{"channel":"hitakashi","name":"UnknownSoldier","token":null,"isAdmin":false}}]}

Server Information

hitbox sends very little information as server messages, but hopefully they implement more as their pretty informational.

Stream Resource Change.

Received from the chat server. These seem to be sent when Title/Game updates are made.

5:::{"name":"message","args":[{"method":"serverMsg","params":{"channel":"hitakashi","text":{"media":{"category_id":"32401","category_name":"Mario Kart 8","category_name_short":null,"category_seo_key":"mario-kart-8","category_viewers":"16","category_media_count":"1","category_channels":null,"category_logo_small":null,"category_logo_large":"/static/img/games/2600974-12510938343_01c49da2be_o.jpg","category_updated":"2015-01-12 05:03:38","media_status":"Testing. sshhhhh","media_category_id":"32401"}},"type":"resourceUpdate","time":1421043231}}]}

Broadcaster Information

This section contains any info sent/received from the chat that differs from Moderator or User information

Grant Moderator (makeMod)

Sent when you mod a user. Receives a infoMsg telling you it was successful.

5:::{"name":"message","args":[{"method":"makeMod","params":{"channel":"hitakashi","name":"Hitabot","token":""}}]}

Remove Moderator (removeMod)

Sent when you unmod a user. Receives a infoMsg telling you it was successful.

5:::{"name":"message","args":[{"method":"removeMod","params":{"channel":"hitakashi","name":"Hitabot","token":""}}]}

IP Ban User (banUser)

Sent when you IP ban a user. Broadcaster Only. Don't try this on an account on your IP ;)

5:::{"name":"message","args":[{"method":"banUser","params":{"channel":"hitakashi","name":"Hitabot","token":"","banIP":true}}]}

Moderator Information

This section contains any info sent/received from the chat that differs from User information

Ban User (banUser)

Sent when you ban a user. Receives a infoMsg telling you it was successful. Receives a banList with banned users. Note: If a broadcaster bans a moderator, It doesn't remove mod powers.

5:::{"name":"message","args":[{"method":"banUser","params":{"channel":"hitakashi","name":"Hitabot"}}]}

Unban User (unbanUser)

Sent when you unban a user. Receives a infoMsg telling you it was successful. Receives a banList with banned users.

5:::{"name":"message","args":[{"method":"unbanUser","params":{"channel":"hitakashi","name":"Hitabot","token":""}}]}

Banned User Info (userInfo - Banned User)

Received when you send getChannelUser on a banned user

5:::{"name":"message","args":[{"method":"userInfo","params":{"channel":"hitakashi","name":"hitabot","timestamp":1402039949,"role":"banned","banned":true}}]}

User Ban List (banList)

Sent when you ban/unban a user and when there's a banned user in the room.

5:::{"name":"message","args":[{"method":"banList","params":{"channel":"hitakashi","data":["hitabot"]}}]}

Timeout User (kickUser)

Sent when you timeout a user. Receives a infoMsg telling you it was successful.

5:::{"name":"message","args":[{"method":"kickUser","params":{"channel":"hitakashi","name":"Hitabot","token":"","timeout":600}}]}

Enable Slow Mode (slowMode)

Sent when you enable slow mode. Disable slow mode is time = 0

5:::{"name":"message","args":[{"method":"slowMode","params":{"channel":"hitakashi","time":10}}]}

Enabled Subscriber On (Fork of slowMode)

Sent when you enable Subscriber Only Mode

5:::{"name":"message","args":[{"method":"slowMode","params":{"channel":"theebstream","subscriber":true,"rate":0}}]}

Subscriber Only Off

Sent when you disabled Subscriber Only Mode

5:::{"name":"message","args":[{"method":"slowMode","params":{"channel":"theebstream","time":0}}]}

User Information

This section contains any info sent/received from the chat that is sent to users.

Channel User List (getChannelUserList)

Sent when you open the User List.

5:::{"name":"message","args":[{"method":"getChannelUserList","params":{"channel":"hitakashi"}}]}

User List (userList)

Received when you send getChannelUserList. Admins consist of Broadcasters, Editors, Ambasadors and Staff members. Users are moderators and Anons are Viewers. Guests is the amount of unregistered users.

5:::{"name":"message","args":[{"method":"userList","params":{"channel":"hitakashi","data":{"Guests":null,"admin":["Hitakashi-Test","Hitakashi"],"user":[],"anon":["Claptrap"],"isFollower":["Hitakashi"],"isSubscriber":[],"isStaff":[],"isCommunity":[]}}}]}

Request User Info (getChannelUser)

Sent when you click on a User

5:::{"name":"message","args":[{"method":"getChannelUser","params":{"channel":"hitakashi","name":"hitabot"}}]}

User Info (userInfo)

Received when you send getChannelUser

5:::{"name":"message","args":[{"method":"userInfo","params":{"channel":"hitakashi","name":"Hitabot","timestamp":1402044329,"role":"anon","isFollower":false,"isSubscriber":false,"isOwner":false,"isStaff":false}}]}

Slow Mode Info (On)

Recieved from the chat server when slow mode is enabled. Disabled: slowTime = 0

5:::{"name":"message","args":[{"method":"slowMsg","params":{"text":"Slow mode set to 10 seconds","channel":"hitakashi","timestamp":1421044036,"action":"isAdmin","slowTime":10}}]}

Subscriber Only Mode Info (On)

Recieved from the chat server when Subscriber Only Mode is enabled

5:::{"name":"message","args":[{"method":"slowMsg","params":{"text":"Subscriber only mode enabled","channel":"theebstream","timestamp":1407016752,"action":"isAdmin"}}]}

Subscriber Only Mode Info

Recieved from the chat server when Subscriber Only Mode is disabled

5:::{"name":"message","args":[{"method":"slowMsg","params":{"text":"Slow mode disabled.","channel":"theebstream","timestamp":1407016754,"action":"isAdmin","slowTime":0}}]}

Poll Information

This section contains a dump of all the information that I have found for the dashboard options.

Poll (Create)

Sent to the chat to create a poll. I don't really understand the $$hashKey, maybe you can just send it like that, or the website replaced it before it's sent.

5:::{"name":"message","args":[{"method":"createPoll","params":{"channel":"hitakashi","question":"Poll Question","choices":[{"text":"Poll Option 1","votes":0,"$$hashKey":"00Q"},{"text":"Poll Option 2","votes":0,"$$hashKey":"00R"}],"subscriberOnly":false,"followerOnly":false,"start_time":"2015-01-02T05:55:37.399Z","nameColor":"4B9188"}}]}

Poll (Info)

Received from the server. It includes information on the poll and number of votes. Status can include 'started', 'paused', and 'ended'

5:::{"name":"message","args":[{"method":"pollMsg","params":{"channel":"hitakashi","question":"Poll Question","choices":[{"text":"Poll Option 1","votes":"0"},{"text":"Poll Option 2","votes":"0"}],"start_time":"2015-01-02T05:55:37.399Z","clientID":null,"status":"started","voters":[],"nameColor":"4B9188","subscriberOnly":false,"followerOnly":false,"votes":0}}]}

Poll (Info with vote)

5:::{"name":"message","args":[{"method":"pollMsg","params":{"channel":"hitakashi","question":"Poll Question","choices":[{"text":"Poll Option 1","votes":"1"},{"text":"Poll Option 2","votes":"0"}],"start_time":"2014-06-09T02:56:30.860Z","clientID":null,"status":"paused","voters":["Hitakashi"],"nameColor":"585858","subscriberOnly":false,"followerOnly":false,"votes":1}}]}

Poll (Vote)

Sent to the chat server. This is to vote on a open polll. Choices start from 0 (Choice 1) and up.

5:::{"name":"message","args":[{"method":"votePoll","params":{"name":"Hitakashi","channel":"hitakashi","choice":"0","token":""}}]}

Poll (Pause)

Sent to the chat server. Once you pause a poll, you can either start it back up or end it

5:::{"name":"message","args":[{"method":"pausePoll","params":{"channel":"hitakashi","token":""}}]}

Poll (Resume)

Sent to the chat server. This can only be used to start it up after a pause.

5:::{"name":"message","args":[{"method":"startPoll","params":{"channel":"hitakashi","token":""}}]}

Poll (End)

Sent to the chat server. This completely ends the poll and deletes it. You must pause it before ending it.

5:::{"name":"message","args":[{"method":"endPoll","params":{"channel":"hitakashi","token":""}}]}

Poll Info (End)

Received from the chat server. Tells the client the poll has ended

5:::{"name":"message","args":[{"method":"pollMsg","params":{"channel":"hitakashi","status":"ended"}}]}

Sticky Information

This section contains a dump of all the information that I have found for the dashboard options.

Sticky Message (Create)

Sent to the chat to create the MOTD. You do not have to include the time option.

5:::{"name":"message","args":[{"method":"motdMsg","params":{"channel":"hitakashi","name":"hitakashi","nameColor":"585858","text":"Lalalalalala","time":"2014-06-09T02:06:18.263Z"}}]}

Sticky Message (View)

Received from the chat. This is basically sent to everyone in chat. It's also sent inside the dashboard when you create the Sticky

5:::{"name":"message","args":[{"method":"motdMsg","params":{"channel":"hitakashi","name":"hitakashi","nameColor":"585858","text":"Lalalalalala","time":1402279577,"image":"/static/img/channel/Hitakashi_539002d3589e8_small.png"}}]}

Sticky Message (Delete)

Sent to the chat to delete the sticky message. You do not have to include the time option.

5:::{"name":"message","args":[{"method":"motdMsg","params":{"channel":"hitakashi","name":"hitakashi","nameColor":"585858","text":"","time":"2014-06-09T02:10:17.756Z"}}]}

Sticky Message (Cleared)

Received from the chat. This is sent to everyone in chat to clear the Sticky Message

5:::{"name":"message","args":[{"method":"motdMsg","params":{"channel":"hitakashi","name":"hitakashi","nameColor":"585858","time":1402279816,"image":"/static/img/channel/Hitakashi_539002d3589e8_small.png"}}]}

Giveaway Information

This section contains a dump of all the information that I have found for the dashboard options.

Raffle (Create)

Sent to the chat server. This is to create the poll.

5:::{"name":"message","args":[{"method":"createRaffle","params":{"channel":"hitakashi","question":"Question","prize":"Prize","choices":[{"text":"Option 1","votes":0,"$$hashKey":"00U"},{"text":"Option 2","votes":0,"$$hashKey":"00V"}],"subscriberOnly":false,"followerOnly":false,"start_time":"2015-01-02T06:09:11.760Z","nameColor":"4B9188"}}]}

Raffle (Info)

Received from the chat server. This is for regular viewers, without counts for each option. Status includes 'started', 'paused', 'ended', 'hidden' and 'deleted'

5:::{"name":"message","args":[{"method":"raffleMsg","params":{"channel":"hitakashi","question":"Question","prize":"Prize","choices":[{"text":"Option 1"},{"text":"Option 2"}],"start_time":"2015-01-02T06:09:11.760Z","status":"started","forAdmin":false,"nameColor":"4B9188","subscriberOnly":false,"followerOnly":false}}]}

Raffle (Info - Admin)

5:::{"name":"message","args":[{"method":"raffleMsg","params":{"channel":"hitakashi","question":"Question","prize":"Prize","choices":[{"text":"Option 1","count":0},{"text":"Option 2","count":0}],"start_time":"2015-01-02T06:09:11.760Z","status":"started","forAdmin":true,"nameColor":"4B9188","subscriberOnly":false,"followerOnly":false}}]}

Raffle (Vote)

Sent to the chat server. Whenever someone votes it sends out a Viewer and Admin raffleMsg.

5:::{"name":"message","args":[{"method":"voteRaffle","params":{"name":"Hitakashi","channel":"hitakashi","choice":"0"}}]}

Raffle (Paused)

Sent to the chat server. Also sends out a Viewer and Admin raffleMsg with status set to 'paused'

5:::{"name":"message","args":[{"method":"pauseRaffle","params":{"channel":"hitakashi"}}]}

Raffle (Resume)

Sent to the chat server. Also sends out a Viewer and Admin raffleMsg with status set to 'started'

5:::{"name":"message","args":[{"method":"startRaffle","params":{"channel":"hitakashi"}}]}

Raffle (End)

Sent to the chat server. Also sends out a Viewer and Admin raffleMsg with status set to 'ended'

5:::{"name":"message","args":[{"method":"endRaffle","params":{"channel":"hitakashi"}}]}

Raffle (Winner)

Sent to the chat server automatically when endRaffle is called. Sends out a Viewer and Admin winnerMsg. Answer starts at 0 for giveaway option 1

5:::{"name":"message","args":[{"method":"winnerRaffle","params":{"channel":"hitakashi","answer":0}}]}

Raffle (Info - Viewer)

Received from the chat server. It sets the winners chat to include "You won! *channel name* got your email and will contact you.

5:::{"name":"message","args":[{"method":"winnerMsg","params":{"channel":"hitakashi","winner_name":"Hitakashi","winner_picked":true,"forAdmin":false,"answer":0}}]}

Raffle (Info - Admin)

Received from the chat server. It sets the dashboard to include the winners name and email.

5:::{"name":"message","args":[{"method":"winnerMsg","params":{"channel":"hitakashi","winner_name":"Hitakashi","winner_email":"*WINNER EMAIL*","winner_picked":true,"forAdmin":true,"answer":0}}]}

Raffle (Hide)

Sent to the chat server. It hides the giveaway in the chat and sends out a raffleMsg with status set to 'hidden'. Also sends out a winnerMsg again to the dashboard.

5:::{"name":"message","args":[{"method":"hideRaffle","params":{"channel":"hitakashi"}}]}

Raffle (Info - Deleted)

Received from the chat server. It cleans up the giveaway from the channel.

5:::{"name":"message","args":[{"method":"raffleMsg","params":{"status":"delete"}}]}

Raffle (Cleanup)

Sent to the chat server. It resets the giveaway from the dashboard. Sends out a Raffle (Info - Deleted)

5:::{"name":"message","args":[{"method":"cleanupRaffle","params":{"channel":"hitakashi"}}]}

Sub Information

This section contains information pertaining to the subscription program.

Subscriber - New Sub

Recieved from the chat server. This shows a notification in chat saying the user has subbed to the channel.

5:::{"name":"message","args":[{"method":"infoMsg","params":{"text":"PlayInPuddles just subscribed to this channel","channel":"theebstream","subscriber":"PlayInPuddles","type":"subChannel","time":1406063743}}]}

Subscriber - Owner Message

Recieved from the chat server. These are messages from the broadcaster that is a subscriber.

5:::{"name":"message","args":[{"method":"chatMsg","params":{"channel":"theebstream","name":"TheEBStream","nameColor":"FF0000","text":"Message Text Here.","time":1406065858,"role":"admin","isFollower":true,"isSubscriber":false,"isOwner":true,"isStaff":false,"media":false,"image":"/static/img/channel/theebstream_52d337105e5d7_small.jpg"}}]}
You may be wondering why the broadcaster isn't subscriber to it's own channel? Who knows. They can still use the emotes.

Subscriber - Moderator Sub Message

Recieved from the chat server. These are messages from moderators that are subscribers.

5:::{"name":"message","args":[{"method":"chatMsg","params":{"channel":"theebstream","name":"DaKong","nameColor":"B40404","text":""Beats by Dre" headphones, which sell for as much as $450, only cost about $14 to make."Beats by Dre" headphones, which sell for as much as $450, only cost about $14 to make.","time":1406063336,"role":"user","isFollower":true,"isSubscriber":true,"isOwner":false,"isStaff":false,"media":false,"image":"/static/img/chat/theebstream/badge.png"}}]}

Subscriber - User Sub Message

Recieved from the chat server. These are messages from 'guests' (Viewers) that are subscribers.

5:::{"name":"message","args":[{"method":"chatMsg","params":{"channel":"theebstream","name":"AssociateBob","nameColor":"FF8000","text":"https://www.youtube.com/watch?v=MrCPIrs90eg","time":1406063334,"role":"anon","isFollower":true,"isSubscriber":true,"isOwner":false,"isStaff":false,"media":false,"image":"/static/img/chat/theebstream/badge.png"}}]}

Viewer Information

This section contains information on the Viewer Websocket Server which returns infoMsg with viewer counts

To get started you need to initiate a conection to the 'Player Config API' and grab the values `wsUrl`, `wsChannel`, `wsToken`, `userName` and `uuid` from plugins->pingback object.

Once you have those values you can initiate a WebSocket connection to `wsUrl` and send the following message:

{"method":"joinChannel","params":{"channel":"","name":"","token":"", "country":"","uuid":"","isSubscriber":"false","isFollower":"false","embed":"false","referrer":""}}

`channel` = `wsChannel`
`name` = `userName`
`token` = `wsToken`
`uuid` = `uuid`

You will recieve the following message every time the viewer counts are changed:

{"method":"infoMsg","params":{"channel":"hitakashi","viewers":1,"subscribers":0,"followers":1,"registered":1,"embed":0,"online":false}}

As far as I know, offline chanels stats look like it returns the last amount of viewers when it went offline.