Packets

Authorize by license

Authorizes the current initialized session using a license key.

Authorize by license binds the session to a license and opens access to licensed operations. This operation is available only after successful Initialize.

Request

Authorize by license uses packet type = 2.

{
  "type": 2,
  "id": 3,
  "license": "ABCDEF-123456"
}

Prop

Type

Response

{
  "id": 3,
  "license": "ABCDEF-123456",
  "levels": { "tier": "pro" },
  "comment": "main seat",
  "ip_address": "203.0.113.10",
  "time_left": 86400,
  "status": 1
}

Prop

Type

Behavior notes

  • If license is available, server activates it and returns status = 1.
  • If activated license has no client_id yet, server binds current client_id.
  • levels and comment can be included after license lookup, including many non-OK statuses (when data is available).
  • time_left has two modes in current server behavior:
    • newly activated license: unix timestamp of expiration;
    • already activated license: remaining seconds.
  • For statuses where license time is not available, time_left is omitted.

Authorize-by-license statuses

StatusConstantReturned when
1OkLicense authorization succeeded.
6InternalServerErrorServer failed to process authorization due to an internal error.
7AlreadyAuthorizedSession is already authorized and authorization was requested again.
602AppSessionsQuotaExceededAuthorized sessions count reached the application plan limit.
100LicenseNotFoundLicense was not found in this application.
101LicenseTooShortlicense is shorter than 6 characters.
102LicenseTooLonglicense is longer than 64 characters.
103LicenseExpiredLicense is activated but expired (or has no expiration date).
104LicensePausedLicense is paused.
105LicenseBlacklistedLicense is blacklisted.
502ClientIDMismatchLicense is bound to a different client_id than current session.

Connection-close cases (before/around this usecase)

Authorize by license itself returns JSON responses with status, 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.

On this page