OpenRCS API reference · v1 ← Back to console Swagger UI
Accounts

Confirm SMS MFA enrolment (step 2 — enables the factor)

POST /account/mfa/confirm bearer_auth

Step 2 of the SMS MFA opt-in. Verifies the texted code (marks the phone number verified) and enables SMS as the preferred MFA. The next `POST /login` step 1 returns `challenge_name: "SMS_MFA"` + `session`; the existing login step 2 answers it with the code.

Parameters

NameInTypeRequiredDescription
Authorization header string yes Bearer token obtained from `POST /login`.

Request body

FieldTypeRequiredDescription
code string yes The 6-digit code texted by POST /account/mfa.
access_token string yes The caller's access token, as returned by `POST /login` (body field — the `Authorization` header carries the id token).
{
  "code": "123456",
  "access_token": "<access_token>"
}

Responses

StatusDescription
200 SMS MFA enabled.
400 Missing/invalid `code` or `access_token` (`invalid mfa code`, `mfa code expired`, `invalid mfa request`).
401 Missing authorizer claims (`unauthorized`), or an invalid body `access_token` (`invalid access token`).
429 Too many attempts; retry later.
502 Upstream authentication call failed; a generic error is returned and no internals are leaked.

200 example

{
  "mfa": "sms"
}