Data types and enums
Shared types used across Blazeauth WebSocket payloads.
Data types and enums
This page defines the shared types used in Blazeauth WebSocket payloads.
Packet id (id)
- Field name:
id - Type: uint64
- Where: present in every request payload
The server echoes id back in the response payload so you can correlate responses with requests.
Recommendations:
- Use a monotonically increasing integer per connection (
1,2,3...). - In JavaScript clients, keep
idwithin the safe integer range (<= 9007199254740991).
credentials_type
credentials_type is an integer enum used by account endpoints.
| Value | Meaning |
|---|---|
0 | login/password |
1 | email/password |
When credentials_type = 1, the login field must be a valid email address.
levels
levels is a JSON array of strings:
You can interpret levels as tags/roles that control access in your application.
status (APIStatus)
Most responses include a status integer.
1means OK.- other values represent specific outcomes (invalid license, not authorized, etc.).
See Status codes for the full list.
time_left
time_left is not identical across all endpoints.
License-based endpoints
get_current_license:time_leftis seconds remaining until expiration.auth_by_license:time_leftis intended to be seconds remaining, but when a license is activated inside the same call it can be returned as an absolute Unix timestamp. See the note in that endpoint.
Account-based endpoints
auth_by_credentialsandget_current_account:time_leftis an absolute Unix timestamp (seconds since epoch, UTC) representing when the account's license/subscription access ends.
If you are writing a shared client, treat time_left as endpoint-specific and normalize it into your own expires_at/seconds_remaining model.
Panel events
Panel events are server-push messages with:
- envelope
type = 18 - payload field
event_type(integer)
See Panel events for the event type list.