Skip to content

Instantly share code, notes, and snippets.

/// SEE doc.zebitex.com for availble channels
const WebSocket = require('ws')
const ws = new WebSocket('wss://pusher-stage.zebitex.com/app/pusher_key?protocol=7&client=js&version=5.0.3&flash=false'); // ws.zebitex.com for prod
ws.on('open', function open() {
//// once connected : {"event":"pusher:connection_established","data":"{\"socket_id\":\"6.625468\",\"activity_timeout\":120}"}
const socket_id= "6.625468"
const info = await zebitex.command_rest.getSessionInfo()
//// info payload : {"sn":"ZEBXXXXXXXXTEX","isVerified":true,"isCorporate":false,"email":"[email protected]","lang":null,"nickname":"nick","canChangePassword":true,"isApplicationVerified":true,"emailNotifications":true,"pushNotifications":true,"productAnnouncementsNotifications":true,"mfa":{"enabled":false,"passed":false}}