curl --request POST \
--url https://relay.mainnet.kuru.io/auth/token \
--header 'Content-Type: application/json' \
--data '{"challengeId":"8c4a11c6eb574d16972fac2a8c85a6dc","signature":"0x<65-byte-signature>","uid":"10"}'
{
"accessToken": "<signed-JWT-with-kuru_account-claim>",
"tokenType": "Bearer",
"expiresAt": "2026-08-27T11:00:00Z",
"wallet": "0x1111111111111111111111111111111111111111"
}
{
"code": "AUTHENTICATION_UNAVAILABLE",
"message": "account authorization unavailable",
"retryable": true,
"retryAfterMs": 1000
}
{
"code": "AUTHENTICATION_FAILED",
"message": "authentication failed",
"retryable": false
}
Public authentication
Exchange challenge for token
Exchange a signed challenge for a short-lived wallet-bound JWT.
POST
/
auth
/
token
curl --request POST \
--url https://relay.mainnet.kuru.io/auth/token \
--header 'Content-Type: application/json' \
--data '{"challengeId":"8c4a11c6eb574d16972fac2a8c85a6dc","signature":"0x<65-byte-signature>","uid":"10"}'
{
"accessToken": "<signed-JWT-with-kuru_account-claim>",
"tokenType": "Bearer",
"expiresAt": "2026-08-27T11:00:00Z",
"wallet": "0x1111111111111111111111111111111111111111"
}
{
"code": "AUTHENTICATION_UNAVAILABLE",
"message": "account authorization unavailable",
"retryable": true,
"retryAfterMs": 1000
}
{
"code": "AUTHENTICATION_FAILED",
"message": "authentication failed",
"retryable": false
}
Public endpoint. No JWT or
The response fields are unchanged for scoped login. The signed JWT additionally contains
Authorization header is required. It verifies the wallet’s signed challenge, consumes the challenge, and returns a wallet-bound bearer token. A challenge succeeds at most once. Include optional uid to request a verified account-scoped JWT for the account rate tier; leaving it out retains wallet-only login and the wallet-based rate tier. POST /auth/challenge is unchanged.
Canonical low-s, 65-byte EOA personal-sign signature. The recovery byte may be
0/1 or 27/28.Optional trading account ID as a positive canonical uint40 decimal string, for example
"10". Relay verifies the challenge wallet’s current trading permission for this exact account and resolves its root. Use the child ID when trading a subaccount; do not supply a client-chosen root ID. A denied grant returns AUTHENTICATION_FAILED; an unavailable account read returns retryable AUTHENTICATION_UNAVAILABLE.curl --request POST \
--url https://relay.mainnet.kuru.io/auth/token \
--header 'Content-Type: application/json' \
--data '{"challengeId":"8c4a11c6eb574d16972fac2a8c85a6dc","signature":"0x<65-byte-signature>","uid":"10"}'
kuru_account with string fields uid, root_uid, chain_id, and account_core. Do not read the quota or root ID from untrusted request input. A scoped token is bound to one trading account: the signed header.accountId and required WebSocket account_id must match its uid. Re-login with uid to migrate an existing token; changing a submission alone does not scope it. Token issuance does not register the account or grant on-chain permission.
{
"accessToken": "<signed-JWT-with-kuru_account-claim>",
"tokenType": "Bearer",
"expiresAt": "2026-08-27T11:00:00Z",
"wallet": "0x1111111111111111111111111111111111111111"
}
{
"code": "AUTHENTICATION_UNAVAILABLE",
"message": "account authorization unavailable",
"retryable": true,
"retryAfterMs": 1000
}
{
"code": "AUTHENTICATION_FAILED",
"message": "authentication failed",
"retryable": false
}
Body
application/json
Response
Wallet-bound JWT. A scoped token includes signed kuru_account string claims (uid, root_uid, chain_id, account_core); the response envelope itself is unchanged.