CreateAccountSSOCode¶
Endpoint¶
POST /sso/account/code
Description¶
Creates a one-time sign-in link for an existing enabled trading account. The server returns the terminal URL for the account's brand and the brand's default language. The link contains an opaque 64-character lowercase hexadecimal code and expires after 60 seconds. It can be redeemed only once, and only for the brand to which it was issued.
Codes are held in bounded process memory as hashes. They are invalidated if the server restarts, and the code is consumed by any redemption attempt, including one with a different brand.
Authorization¶
Send a manager session JWT in Authorization. The caller must have an enabled
staff account and access to the target account's trading group. The normal
grant requires both access_backoffice = 1 and the explicit
create_account_sso = 1 permission. Only a global super admin
(super_admin = 1) bypasses those two grant checks; a brand admin does not
receive this permission automatically. Brand/group visibility, target
enablement, licensed API admission, and terminal access approval for the
brand's configured terminal host are checked by the server. API admission
alone does not approve the terminal host.
Body Parameters¶
{
"login": 123456
}
| Field | Type | Required | Description |
|---|---|---|---|
login |
integer | Yes | Positive trading login of the enabled account. The account's group must be visible in the caller's current brand/group scope. |
Success response¶
HTTP 200:
{
"login_url": "https://terminal.example/en/platform?sso_code=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"expires_in": 60
}
| Field | Type | Description |
|---|---|---|
login_url |
string | Complete terminal URL with the one-time sso_code query parameter. The path language uses the brand default, falling back to en. |
expires_in |
integer | Code lifetime in seconds. |
The response contains only these two fields. Do not treat the URL as a durable login link; request a new one after expiration or a failed redemption.
Errors¶
| HTTP | Error | Description |
|---|---|---|
400 |
INVALID_DATA |
login is missing, is not an integer, or is not positive. |
403 |
RET_NOT_ENOUGH_RIGHTS |
Router permission check rejected the staff session before the handler ran. |
403 |
SSO_ACCESS_DENIED |
Caller is disabled, lacks the required grant/scope, or the account is unavailable or outside current brand/group visibility. |
403 |
BRAND_NOT_AVAILABLE |
Target brand is not admitted for licensed API access. |
503 |
SSO_CONFIGURATION_INVALID |
The brand terminal URL or language could not be used to construct a safe link. |
503 |
SSO_CODE_UNAVAILABLE |
Code generation failed or the bounded code store is full. |
503 |
LICENSE_NOT_ACTIVE |
The required license lease is not active. |