Note that, the subscription does not work like normal GraphQL subscription in the sense that it returns every possible event with all availablefields regardless of the subscription query given. So you cannot only listen to, say chat messages, and so you need to filter out uninterested events.
The server sends a "ka" message every 25 seconds. If you do not receive "ka", you should reconnect.
We currently provide two web socket endpoints type. One for livestream/chat events streamMessageReceived and the other for chest events treasureChestMessageReceived .
The currently available streamMessageReceived events are:
Stream go live
Stream go offline
First time follow
Change of chat mode
The currently available treasureChestMessageReceived events are:
Chest giveway ended message
Chest giveway started message. Chest value should be updated to 0.
Some amount of chest value is expired message
Chest value updated message
How to connect
Clients establish a secure WebSocket connection to our endpoint.
"authorization" : "YOUR_APP_ACCESS_TOKEN"
and expects to receive an ack:
Then client could subscribe to a particular endpoint by sending as follows: