Open VTS vehicle tracking software logo

WebSocket (Real-time)

Socket.IO namespaces, connection examples, and event documentation for real-time communication.

Open VTS uses Socket.IO for real-time communication. Unlike the REST API, WebSocket connections are persistent and push data to connected clients immediately.

WebSocket connections are separate from REST endpoints. They require a valid JWT token passed during the connection handshake — not in HTTP headers.

Telemetry Gateway

Namespace/telemetry
AuthJWT token sent on connection

Live vehicle position and status updates via Socket.IO.

Connection

const socket = io('wss://api.openvts.io/telemetry', {
  auth: { token: 'Bearer eyJhbGciOiJI...' }
});

Events Received

telemetry_update
Live vehicle position update

Payload

{ imei, lat, lng, speed, heading, timestamp, ... }
vehicle_status
Vehicle status change

Payload

{ imei, status: "running"/"idle"/"stopped" }

Notification Gateway

Namespace/notifications
AuthJWT token sent on connection

Real-time notifications and vehicle alerts via Socket.IO.

Connection

const socket = io('wss://api.openvts.io/notifications', {
  auth: { token: 'Bearer eyJhbGciOiJI...' }
});

Events Received

notification
New notification

Payload

{ id, title, message, category, timestamp }
alert
Vehicle alert

Payload

{ vehicleId, type, severity, message, coordinates }