curl --request POST \
--url https://aropay.aro.media/api/v1/auth/login/totp \
--header 'Content-Type: application/json' \
--data '
{
"pendingToken": "eyJhbGciOi…",
"code": "123456"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({pendingToken: 'eyJhbGciOi…', code: '123456'})
};
fetch('https://aropay.aro.media/api/v1/auth/login/totp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://aropay.aro.media/api/v1/auth/login/totp"
payload = {
"pendingToken": "eyJhbGciOi…",
"code": "123456"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"data": {
"user": {
"id": "ckusr0001abcd",
"email": "jsmith@example.com",
"name": "<string>",
"company": "<string>",
"mustChangePassword": true,
"totpEnabled": true,
"lastLoginAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}
}{
"ok": false,
"error": {
"code": "validation_error",
"message": "Request validation failed.",
"details": [
{
"path": "amount",
"message": "Required"
}
]
}
}{
"ok": false,
"error": {
"code": "invalid_totp_code",
"message": "That code is not valid."
}
}{
"ok": false,
"error": {
"code": "account_locked",
"message": "Too many failed attempts. Try again later."
}
}{
"ok": false,
"error": {
"code": "rate_limited",
"message": "Too many requests. Try again shortly."
}
}{
"ok": false,
"error": {
"code": "internal_error",
"message": "An unexpected error occurred."
}
}Complete TOTP login
Second step for accounts with two-factor authentication. Exchange the
pendingToken from POST /auth/login plus a live 6-digit
authenticator code for a session. Codes are single-use within their
30-second window.
Every code tried counts toward a per-account cap before it is
checked; step-up codes (POST /keys, POST /me/passkeys/options,
POST /wallets/{id}/export, POST /me/totp/disable) share the same
count. The 5th code tried
without an accepted one locks code entry for 15 minutes; after a lock
passes one more code may be tried, and each further failure doubles
the lock (30 min, 60 min, …), up to 24 hours. While locked this step
answers 423 account_locked, even for a valid code. Neither a
correct password nor restarting from POST /auth/login resets the
count; only an accepted code, re-enrolling 2FA, or an admin 2FA or
password reset does. Of two concurrent attempts that read the same count, one gets
429 rate_limited with retryAfterSeconds: 1.
curl --request POST \
--url https://aropay.aro.media/api/v1/auth/login/totp \
--header 'Content-Type: application/json' \
--data '
{
"pendingToken": "eyJhbGciOi…",
"code": "123456"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({pendingToken: 'eyJhbGciOi…', code: '123456'})
};
fetch('https://aropay.aro.media/api/v1/auth/login/totp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://aropay.aro.media/api/v1/auth/login/totp"
payload = {
"pendingToken": "eyJhbGciOi…",
"code": "123456"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"data": {
"user": {
"id": "ckusr0001abcd",
"email": "jsmith@example.com",
"name": "<string>",
"company": "<string>",
"mustChangePassword": true,
"totpEnabled": true,
"lastLoginAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}
}{
"ok": false,
"error": {
"code": "validation_error",
"message": "Request validation failed.",
"details": [
{
"path": "amount",
"message": "Required"
}
]
}
}{
"ok": false,
"error": {
"code": "invalid_totp_code",
"message": "That code is not valid."
}
}{
"ok": false,
"error": {
"code": "account_locked",
"message": "Too many failed attempts. Try again later."
}
}{
"ok": false,
"error": {
"code": "rate_limited",
"message": "Too many requests. Try again shortly."
}
}{
"ok": false,
"error": {
"code": "internal_error",
"message": "An unexpected error occurred."
}
}