Reference
auth_by_credentials
Authorize the session using login/password or email/password.
auth_by_credentials
Authorize the current WebSocket session using a credentials account.
- Type:
4 - Requires initialization: yes
- Requires authorization: no
Request and response example
auth_by_credentials
Authorize a session using login/password or email/password.
Request fields
| Field | Type | Required | Meaning |
|---|---|---|---|
id | uint64 | yes | Request id. |
login | string | yes | Login or email (depends on credentials_type). |
password | string | yes | Plain password. |
license | string | null | no | Optional license key to activate during auth. |
credentials_type | int | yes | 0 = login/password, 1 = email/password. |
Response fields (success)
| Field | Type | Meaning |
|---|---|---|
id | uint64 | Your request id. |
login | string | Account login. |
levels | string[] | Account levels/tags. |
comment | string | null | Optional internal note. |
ip_address | string | null | IP stored for this account. |
time_left | int64 | Absolute Unix timestamp (UTC) when access ends, if license-required. |
license_required | bool | Whether the account requires a valid license/subscription. |
status | int | Result status. |
Common statuses
| Status | Meaning |
|---|---|
1 | ok |
3 | not_authorized (returned by other endpoints, not this one) |
202 | account_not_found |
203 | account_has_no_valid_licenses |
210 | account_blacklisted |
303 | sessions_quota_exceeded |
216 | account_credentials_type_invalid |
6 | internal_server_error |
Notes
- If
license_required = true, the server expects the user to have at least one active license/subscription in Blazeauth. - If you pass
licenseand activation succeeds, the license becomes bound to the currentclient_id.