SessionKit DOCS
Get Started
API Reference Session Connected
WSsession.connected↓ Server → Client

Session Connected

Emitted by the server when a browser session has fully initialized and is ready to accept commands.

The ID of the session that connected. ISO 8601 timestamp of the connection event. Browser capabilities available in this session. Whether stealth mode is active. Active proxy configuration. Current viewport dimensions.

Payload

{
  "event": "session.connected",
  "data": {
    "sessionId": "ses_k8m2n4p6",
    "timestamp": "2026-06-23T15:00:01Z",
    "capabilities": {
      "stealth": true,
      "proxy": { "type": "residential", "country": "US" },
      "viewport": { "width": 1920, "height": 1080 }
    }
  }
}

Usage

ws.on('message', (raw) => {
  const msg = JSON.parse(raw);
  if (msg.event === 'session.connected') {
    console.log(`Session ${msg.data.sessionId} is ready`);
  }
});
⌘I
AI Assistant

Ask me anything about the documentation.

ESC