Real-Time Communication
OpenShock provides two real-time communication channels for client applications: SignalR hubs for device management and control, and a live control WebSocket for continuous real-time shocker interaction.
All endpoints use JSON payloads over WebSocket transport.
Authentication
Both SignalR hubs and the live control WebSocket require the following headers:
| Header | Description |
|---|---|
User-Agent | A meaningful identifier for your application (e.g. MyApp/1.0). Empty values are rejected with 403. |
OpenShockToken | API token created in account settings. |
The share link hub is an exception - see Share Link Hub for its authentication model.
SignalR Hubs
- User Hub - Device management, control commands, and real-time event notifications for authenticated users.
- Share Link Hub - Interact with devices exposed through a public share link. Supports both authenticated and guest access.
WebSocket
- Live Control - Raw JSON WebSocket for continuous real-time shocker control (e.g. VR integrations).
Common Types
- Types Reference - Shared data types used across all endpoints.