blazeauth
Protocol

Implementation checklist (AI-ready)

A stable, code-oriented summary of Blazeauth WebSocket behavior designed for SDK generation.

Implementation checklist (AI-ready)

This page is intentionally written for deterministic parsing. It summarizes the Blazeauth socket protocol for implementing a client or generating an SDK.

Transport

  • WebSocket endpoint: wss://eu1.blazeauth.net
  • Messages are JSON envelopes: { "type": number, "payload": object }
  • Some operations stream data using an additional binary frame (see File transfer).

Connection lifecycle

  1. Open a WebSocket connection.
  2. Send initialize (type 1) within 15 seconds of connecting.
  3. After initialization succeeds (status = 1), you may call other operations.
  4. Authorize the session using one of:
    • auth_by_license (type 3)
    • auth_by_credentials (type 4)

If you send any non-initialize request before initialization, the server rejects the request.

Envelope

Request:

Message envelope
Every request is a { type, payload } JSON object.

Rules:

  • type selects the usecase.
  • payload.id is a uint64 chosen by the client.
  • For non-streaming operations, the server sends exactly one JSON response with the same type and the same payload.id.

Authorization gates

Some operations require authorization:

  • Protected operations return not_authorized (3) if you are not authorized.
  • A session becomes authorized after a successful auth_by_license or auth_by_credentials.

Status codes

Usecase types

Usecase type ids are stable integers (0..18). Full list:

Panel events

The server can send asynchronous events:

  • type = 18
  • payload.id = 18446744073709551615
  • payload.event_type is an integer (0..14)

Clients should handle these events even if they never call panel_event_subscribe (currently reserved).

File transfer (binary streaming)

transfer_file (type 8) streams the file in chunks. Each chunk is delivered as two WebSocket messages:

  1. JSON response message (TransferFileResponse)
  2. Binary WebSocket frame with exactly chunk_size bytes

If chunk_size is 0, there is no binary frame for that message.

The final JSON message for a successful download uses:

  • status = 1
  • includes file_checksum and range_checksum

All details:

Known edge cases

  • time_left differs by endpoint. See /docs/protocol/data-types.
  • If you implement the client in JavaScript, avoid using request ids larger than 2^53-1.

On this page