WebSocket authentication is session-based, not purely stateless. You first authenticate over HTTP with your API token to establish an authenticated session, and the WebSocket handshake reuses that session. The handshake requires an existing authenticated session and is rejected if none exists. In practice, sending the standard
x-auth-apikey header (with x-auth-scheme) on the handshake request establishes and reuses that session in a single step — see Authentication flow below.Prerequisites
- A Rhombus organization with API access enabled
- An API token generated from the Rhombus console
Generating an API Token
- Log in to the Rhombus console
- Navigate to Settings > API Access
- Click Generate API Token
- Copy and securely store the token
Authentication Parameters
WebSocket authentication requires both HTTP headers and query parameters during the handshake:HTTP Headers
Query Parameters
Connection URL Format
The examples below use the US host. EU organizations connect to
wss://ws.eu.rhombussystems.com:8443/websocket instead — the parameters and protocol are identical.Standard API Token
Partner API Token
Partner integrations can operate on behalf of client organizations by specifying the target org in thex-auth-org header:
Authentication Flow
The handshake authenticates over HTTP and relies on an authenticated session. Sending thex-auth-apikey header (with x-auth-scheme) on the handshake request authenticates that request, establishing the session the handshake reuses. The server rejects the handshake if no authenticated session is present.
Retrieving Your Organization UUID
Before subscribing to topics, you need your organization UUID. Retrieve it via the REST API:orgUuid which you’ll use for topic subscriptions.
Example: Authenticated Connection
Partner API Authentication
If you are a Rhombus partner building integrations on behalf of client organizations:- Use
partner-api-tokenas thex-auth-scheme - Include the client’s
orgUuidas thex-auth-orgheader - Your partner API token must have permissions for the target organization
Security Best Practices
- Never hardcode API tokens in source code. Use environment variables or a secrets manager.
- Rotate tokens regularly and revoke unused tokens from the Rhombus console.
- Use WSS only. The Rhombus endpoint enforces TLS encryption on port 8443.
- Store WebSocket tokens separately if your application also uses certificate-based REST API authentication.