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_idyet, server binds currentclient_id. levelsandcommentcan be included after license lookup, including many non-OK statuses (when data is available).time_lefthas 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_leftis omitted.
Authorize-by-license statuses
| Status | Constant | Returned when |
|---|---|---|
1 | Ok | License authorization succeeded. |
6 | InternalServerError | Server failed to process authorization due to an internal error. |
7 | AlreadyAuthorized | Session is already authorized and authorization was requested again. |
602 | AppSessionsQuotaExceeded | Authorized sessions count reached the application plan limit. |
100 | LicenseNotFound | License was not found in this application. |
101 | LicenseTooShort | license is shorter than 6 characters. |
102 | LicenseTooLong | license is longer than 64 characters. |
103 | LicenseExpired | License is activated but expired (or has no expiration date). |
104 | LicensePaused | License is paused. |
105 | LicenseBlacklisted | License is blacklisted. |
502 | ClientIDMismatch | License 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 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. |