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_left is included only when active license time is available.

Get-current-account statuses

StatusConstantReturned when
1OkCurrent account data returned successfully.
3NotAuthorizedSession is not authorized by credentials.
6InternalServerErrorServer failed to fetch license-duration data for this account.
203AppUserHasNoValidLicensesAccount 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 codeErrorWhen it happens
4200connection is not initializedRequest was sent before successful Initialize.
4201rate limit hitGlobal per-session packet rate limit was exceeded.
4302invalid request bodyPacket body does not match the required schema for this operation.
4304received unsupported dataClient sent unsupported frame type (request packets must be text JSON).

On this page