blazeauth
GuidesAny language

Implement a client in any language

The exact rules to implement Blazeauth over WebSocket without using the C++ SDK.

Implement a client in any language

Blazeauth uses a single persistent WebSocket session. If you can:

  • send JSON text frames
  • receive JSON text frames
  • receive binary frames

you can implement the full client in any language.

What you must implement

Your client needs only a few concepts:

  • a WebSocket connection
  • a monotonic packet id (uint64)
  • a request/response correlation map (id → pending request)
  • a small state machine: connect → initialize → authenticate → use API
  • a binary transfer handler for transfer_file
Build your own client
Protocol rules and minimal client skeletons to implement Blazeauth in any language.

Message rules

All JSON messages share the same envelope:

  • type: integer usecase identifier
  • payload: request or response object for that type

See: Message format and Usecase types.

Initialization and authorization

Status codes

Most responses contain payload.status.

  • 1 means success
  • non-1 means failure

Some responses omit status (example: ping).

See: Status codes.

File transfer

transfer_file is special: when the server sends a chunk, it uses two WebSocket messages:

  1. a JSON response for transfer_file that tells you chunk_size and whether binary_data = true
  2. the raw binary frame with exactly chunk_size bytes

If chunk_size = 0, the binary frame is not sent.

See: File transfer and transfer_file.

Panel events

Panel events are server-push JSON messages of type = 18.

They are not responses to your requests and can arrive at any time.

See: Panel events.

On this page