Packets

Authorize by credentials

Authorizes the current initialized session using login and password credentials.

Authorize by credentials authenticates an application account with credentials. This operation is available only after successful Initialize.

Request

Authorize by credentials uses packet type = 3.

{
  "type": 3,
  "id": 4,
  "login": "user@example.com",
  "password": "strong-password",
  "credentials_type": 1
}

Prop

Type

Response

{
  "id": 4,
  "login": "user@example.com",
  "levels": { "tier": "pro" },
  "comment": "main account",
  "ip_address": "203.0.113.10",
  "time_left": 86400,
  "license_required": true,
  "status": 1
}

Prop

Type

Behavior notes

  • For credentials_type = 1, login must be a valid email format.
  • AppUserNotFound is used for unknown account and for invalid credentials.
  • If license_required is true, account authorization requires active license coverage.
  • time_left is included only when active license coverage is available.

Authorize-by-credentials statuses

StatusConstantReturned when
1OkCredentials 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.
100LicenseNotFoundProvided license was not found in this application.
101LicenseTooShortProvided license is shorter than 6 characters.
102LicenseTooLongProvided license is longer than 64 characters.
107LicenseAlreadyActivatedProvided license is already activated.
200AppUserNotFoundAccount was not found or provided credentials are invalid.
201AppUserBlacklistedAccount is blacklisted.
203AppUserHasNoValidLicensesAccount requires active license coverage, but none is available.
205AppUserLoginTooShortlogin is shorter than 4 characters.
206AppUserLoginTooLonglogin is longer than 320 characters.
207AppUserPasswordTooShortpassword is shorter than 4 characters.
208AppUserPasswordTooLongpassword is longer than 64 characters.
209AppUserEmailInvalidcredentials_type = 1 but login is not a valid email format.
210AppUserCredentialsTypeInvalidcredentials_type has unsupported value (must be 0 or 1).
502ClientIDMismatchAccount is bound to a different client_id than current session.

Connection-close cases (before/around this usecase)

Authorize by credentials 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