Skip to content

Errors and Disconnects

This page lists authentication errors and application-level disconnect reasons.

Authentication errors

Authentication failures are returned in AUTH_RESULT.error_code.

error_codeMeaningCommon cause
INVALID_FORMATInvalid authentication messageInvalid JSON, missing type, first client message is not AUTH, or missing app_id, key_id, or secret
ACCESS_DISABLEDLocal data access is disabledThe local data access policy is not enabled
INVALID_CREDENTIALSCredential mismatchApp is not allowlisted, key_id is wrong, or secret does not match
CONNECTION_LIMITConnection limit reachedTotal or per-app connection quota exceeded
AUTH_TIMEOUTAuthentication timed outClient did not send a valid AUTH within 20 seconds
SERVER_ERRORInternal server errorUnexpected local gateway error

Disconnect message

When LIVE Studio intentionally terminates an authenticated connection, it may send DISCONNECT before closing the WebSocket.

FieldTypeRequiredDescription
typestringYesAlways DISCONNECT
app_idstringYesAuthenticated application identifier
reason_codenumberYesApplication-level reason code
reasonstringYesHuman-readable reason
timestampnumberYesUnix timestamp in milliseconds
json
{
  "type": "DISCONNECT",
  "app_id": "your_app_id",
  "reason_code": 510,
  "reason": "Application access policy changed",
  "timestamp": 1786010400000
}

Disconnect reason codes

reason_codeNameDescription
100UserInitiatedServer received an intentional stop request
200PeerClosedPeer already closed the socket
201ClientErrorClient-side transport or message error
300HeartbeatTimeoutServer did not receive WebSocket pong
400AuthFailedAuthentication failed
500ServerShutdownLIVE Studio local event service is stopping
510AccessPolicyChangedAccess disabled, credential revoked, allowlist changed, or quota policy changed

Client behavior

  • Use error_code for authentication failure branching.
  • Use reason_code for disconnect handling.
  • Do not parse message or reason as the only programmatic signal.
  • Re-run service discovery and authentication for a new connection.
  • Apply reconnect backoff after repeated failures.