IO Authentication

Each subscriber MUST connect to his namespace. A namespace is a path specifying which channel communication to use with Hades.


As mentioned in the API section, subscriber and subscriber_id have a major role. Some type are:

  • machine
  • client


let token = `<provided token>`
let organization = 'demo'
let subscriber = 'machine'
const socket = require('')(`https://${organization}${subscriber}`, {
extraHeaders: { token },

Connection callbacks

// called on connection established
socket.on('connect', console.log)
// called on disconnection
socket.on('disconnect', console.log)
// called on connection error
socket.on('error', console.error)