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
- Open a WebSocket connection.
- Send
initialize(type1) within 15 seconds of connecting. - After initialization succeeds (
status = 1), you may call other operations. - Authorize the session using one of:
auth_by_license(type3)auth_by_credentials(type4)
If you send any non-initialize request before initialization, the server rejects the request.
Envelope
Request:
Rules:
typeselects the usecase.payload.idis a uint64 chosen by the client.- For non-streaming operations, the server sends exactly one JSON response with the same
typeand the samepayload.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_licenseorauth_by_credentials.
Status codes
- Most responses contain
status. status = 1means OK.- Full list: /docs/protocol/status-codes
Usecase types
Usecase type ids are stable integers (0..18). Full list:
Panel events
The server can send asynchronous events:
type = 18payload.id = 18446744073709551615payload.event_typeis 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:
- JSON response message (
TransferFileResponse) - Binary WebSocket frame with exactly
chunk_sizebytes
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_checksumandrange_checksum
All details:
Known edge cases
time_leftdiffers by endpoint. See /docs/protocol/data-types.- If you implement the client in JavaScript, avoid using request ids larger than
2^53-1.