TipeeeStream provides events in real time using sockets. It allows you to get your donations, follows, subscriptions and hostings in real time and display them on your stream with your own code.
You need your API Key to listen to TipeeeStream events.

If you need more information about socket.io, we recommend checking the documentation

How to connect to TipeeeStream Socket

Updated on August 7th, 2019.

1. Get the currently available URL and port

GET https://api.tipeeestream.com/v2.0/site/socket
{
  "code": 200,
  "message": "success",
  "datas": {
    "port": "443",
    "host": "https://sso-cf.tipeeestream.com"
  }
}

2. Connect using the response and your API Key

let socket = Socketio('https://sso-cf.tipeeestream.com:443', {
  query: {
    access_token: 'YOUR_API_KEY'
  }
})
GET https://sso-cf.tipeeestream.com:443?access_token="YOUR_API_KEY"

3. On connection, join your Room to receive your events

socket.on('connect', () => {
  socket.emit('join-room', {
    room: 'YOUR_API_KEY',
    username: 'YOUR_USERNAME'
  })
})

4. How to get events

Add a listener to the new-event event

socket.on('new-event', data => {
  // Do something
})
{ 
	"appKey": "####",
	"event": {
		"id":359821,
		"type": "donation",
		"user": {
			"avatar": "5236",
			"country": "FR",
			"username": "lilelulo",
			"providers": [
	      {
					"connectedAt": "2015-10-05T15:28:12+0200",
					"code": "twitch",
					"id": "36820986",
					"username": "lilelulo"
				}
			],
			"created_at": "2015-09-04T18:31:47+0200",
			"session_at": "2015-09-04T18:31:47+0200"
		},
		"ref": "561290126af3f",
		"inserted_at": "2015-10-05T16:58:26+0200",
		"deleted_at": "2015-10-05T17:03:26+0200",
		"created_at": "2015-10-05T16:58:26+0200",
		"parameters": {
			"formattedMessage": "take my moneeeeey!!",
			"message": "take my moneeeeey!!",
			"username": "anonym1",
			"currency": "EUR",
			"amount": 1,
			"resub": 0,
			"viewers": 4
		},
		"formattedAmount": "€1.00",
		"parameters.amount": 1
	}
}