Verify and enable TOTP
POST
/auth/v1/users/current/totp/verifyVerifies the submitted TOTP code against the user's pending setup secret and, if valid, enables TOTP two-factor authentication and returns refreshed tokens.
Authorization
Bearer Authorization<token>
In: header
Request Body
requiredapplication/json{
"$ref": "#/components/schemas/internal_auth.verifyOTPBody",
"$ref-value": {
"properties": {
"code": {
"type": "string"
}
},
"required": [
"code"
],
"type": "object"
}
}Response Body
200application/json
OK
type: unknown
{
"$ref": "#/components/schemas/authv1.TokenResponse",
"$ref-value": {
"properties": {
"access_token": {
"type": "string"
},
"expires_in": {
"type": "integer"
},
"refresh_token": {
"type": "string"
},
"requires_action": {
"type": "string"
},
"token_type": {
"type": "string"
}
},
"type": "object"
}
}curl -X POST "https://api.rixl.com/auth/v1/users/current/totp/verify" \
-H "Content-Type: application/json" \
-d '{
"code": "string"
}'OK
application/json
{
"$ref": "#/components/schemas/authv1.TokenResponse",
"$ref-value": {
"properties": {
"access_token": {
"type": "string"
},
"expires_in": {
"type": "integer"
},
"refresh_token": {
"type": "string"
},
"requires_action": {
"type": "string"
},
"token_type": {
"type": "string"
}
},
"type": "object"
}
}Begin TOTP setup POST
Begins TOTP setup for the authenticated user by generating and returning a provisioning secret and QR code that have not yet been enabled.
Verify TOTP during login POST
Verifies the submitted TOTP code for a pending login session and, if valid, completes authentication and returns access tokens.