Aller au contenu

Enable TOTP

POST
/v1/iam/auth/totp/enable
curl --request POST \
--url http://localhost:8080/v1/iam/auth/totp/enable

Returns the otpauth:// URL (for the authenticator QR) and the recovery codes in plaintext — shown ONCE. The User row stores the encrypted secret (APOPHIS_IAM_TOTP_KEY, C4=b) but totpEnabledAt stays NULL until /iam/auth/totp/verify confirms the user scanned the QR.

TOTP enable payload.

Media type application/json
object
status
required
string
Allowed value: success
code
required
string
data
required
object
otpauthUrl
required
string
secret
required
string
recoveryCodes
required
Array<string>
cache
object
hit
required
boolean
key
string
ageSeconds
integer
expiresAt
string format: date-time
timing
object
totalMs
required
integer
dbMs
integer
externalMs
integer
deprecation
object
sunset
required
string format: date-time
successor
string
note
string
Example
{
"status": "success"
}

Authentification manquante ou invalide.

Media type application/json
object
status
required
string
Allowed value: error
code
required
string
error
required
object
message
string
requestId
required
string
details
Array<object>
object
path
string
code
string
message
string
key
additional properties
Example
{
"status": "error"
}

Conflit d’état (cannot_replay_<status>, idempotency_mismatch).

Media type application/json
object
status
required
string
Allowed value: error
code
required
string
error
required
object
message
string
requestId
required
string
details
Array<object>
object
path
string
code
string
message
string
key
additional properties
Example
{
"status": "error"
}