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 identifierpayload: request or response object for thattype
See: Message format and Usecase types.
Initialization and authorization
- After connect, send
initializewithin 15 seconds. - If your feature requires authorization, then call one of:
Status codes
Most responses contain payload.status.
1means success- non-
1means 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:
- a JSON response for
transfer_filethat tells youchunk_sizeand whetherbinary_data = true - the raw binary frame with exactly
chunk_sizebytes
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.