Packets
Get current account
Returns credential-account data currently bound to the session.
Get current account returns account data for the current session when it is authorized by credentials.
This operation is available only after successful Initialize.
Request
Get current account uses packet type = 16.
{
"type": 16,
"id": 16
}Prop
Type
Response
{
"id": 16,
"login": "demo_user",
"levels": { "tier": "pro" },
"comment": "main account",
"ip_address": "203.0.113.10",
"time_left": 86400,
"license_required": true,
"status": 1
}Prop
Type
Behavior notes
- Request and response are regular text JSON websocket frames.
- This usecase works for credential-based authorization context.
- If session is not authorized by credentials, server returns
NotAuthorized. - Server verifies active license duration for the current account.
- If no active license time is available, server returns
AppUserHasNoValidLicenses. time_leftis included only when active license time is available.
Get-current-account statuses
| Status | Constant | Returned when |
|---|---|---|
1 | Ok | Current account data returned successfully. |
3 | NotAuthorized | Session is not authorized by credentials. |
6 | InternalServerError | Server failed to fetch license-duration data for this account. |
203 | AppUserHasNoValidLicenses | Account has no active licenses with remaining time. |
Connection-close cases (before/around this usecase)
Get current account itself returns regular JSON responses, but session can still be closed by protocol/session guards:
| Close code | Error | When it happens |
|---|---|---|
4200 | connection is not initialized | Request was sent before successful Initialize. |
4201 | rate limit hit | Global per-session packet rate limit was exceeded. |
4302 | invalid request body | Packet body does not match the required schema for this operation. |
4304 | received unsupported data | Client sent unsupported frame type (request packets must be text JSON). |