Create a connection QR code
const url = 'https://api.koneth.com/api/v1/management/servers/6be9a699-2f28-402e-b64e-93ba6bdafe1b/connection-qr';const options = { method: 'POST', headers: { 'X-Request-Id': 'onboarding-client-1042', Authorization: '<Authorization>', 'Content-Type': 'application/json' }, body: '{"mode":"broker"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.koneth.com/api/v1/management/servers/6be9a699-2f28-402e-b64e-93ba6bdafe1b/connection-qr \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --header 'X-Request-Id: onboarding-client-1042' \ --data '{ "mode": "broker" }'Generates a versioned Koneth Terminal connection payload and an SVG QR
image. Requires accounts:connect and access to the target server.
broker identifies the broker without an account. account also
prefills an account number. auto_login creates a single-use code that
expires after 10 minutes by default and signs in with the selected
stored credential. Auto-login QR codes never contain a password.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”UUID of a trading server owned by your organization.
Example
6be9a699-2f28-402e-b64e-93ba6bdafe1bHeader Parameters
Section titled “Header Parameters”Optional correlation ID used for API request billing and logs.
Example
onboarding-client-1042Request Bodyrequired
Section titled “Request Bodyrequired”object
broker selects the broker, account also prefills an account
number, and auto_login creates a single-use sign-in code.
Required for account and auto_login.
Stored credential used by auto_login. Investor credentials create
the server’s read-only access mode.
Lifetime of an auto_login code. Ignored for static broker and
account QR codes.
Examples
Broker only
{ "mode": "broker"}Broker and account number
{ "mode": "account", "accountNumber": "46370895"}One-time investor auto-login
{ "mode": "auto_login", "accountNumber": "46370895", "credentialType": "investor", "expiresInSeconds": 600}Responses
Section titled “Responses”Connection payload and QR image created.
object
object
Versioned koneth-trader://connect payload encoded in the QR image.
Expiry for auto_login; null for a static QR code.
object
Base64-encoded SVG image. Prefix with data:image/svg+xml;base64, to display it.
Example
{ "connection": { "mode": "broker", "credentialType": "trading" }, "qr": { "mimeType": "image/svg+xml" }}Invalid request.
object
Validation issue details when the request fails schema validation.
object
Examplegenerated
{ "error": "example", "issues": [ {} ]}Management API authentication is missing or invalid.
object
Validation issue details when the request fails schema validation.
object
Example
{ "error": "Management API authentication required"}The organization cannot cover the active API request price.
object
Validation issue details when the request fails schema validation.
object
Example
{ "error": "Insufficient API credits"}The key lacks the required scope or server access.
object
Validation issue details when the request fails schema validation.
object
Example
{ "error": "Missing API scope: accounts:read"}The requested resource was not found.
object
Validation issue details when the request fails schema validation.
object
Examplegenerated
{ "error": "example", "issues": [ {} ]}The request conflicts with the current resource state.
object
Validation issue details when the request fails schema validation.
object
Examplegenerated
{ "error": "example", "issues": [ {} ]}Unexpected server error.
object
Validation issue details when the request fails schema validation.
object
Example
{ "error": "Internal server error"}