Enable MFA

Registers a TOTP authenticator for a user from the shared secret returned by GET /login/two-factor/secret, and returns that user's recovery codes. This is a one-time step per user: calling it again for an enrolled user returns 409. The recovery codes are returned only by this call and cannot be retrieved later, so store them before discarding the response. Errors raised by the identity provider rather than by this endpoint are passed through with their original status and a generic body of the form {"message":"Request failed with status code ","details":""}.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

The username issued to the user by AUDD during onboarding.

string
required

The password issued to the user by AUDD during onboarding. Users cannot change their own password.

string
required
length ≥ 16
^[A-Z2-7]{16,}$

The secretBase32Encoded value from GET /login/two-factor/secret. Base32 only: uppercase A-Z and digits 2-7, at least 16 characters. The raw secret field from that response is not Base32 and is rejected with 400.

string
required
^[0-9]{6}$

A current 6-digit TOTP code generated from mfaSecretB32, proving the authenticator is working before enrolment completes.

Headers
string
required

Your environment API key, sent raw with no "Bearer" prefix. Not the JWT from POST /mfa/login; enrolment happens before you have one.

Responses

400

Invalid request. Returned when the Authorization header is absent, when a required body field is missing, when mfaSecretB32 is not Base32 (for example the raw secret value from GET /login/two-factor/secret, or a lowercased string), or when mfaCode is not exactly six digits. Field errors return {"message":"","errors":[""]}; a malformed JSON body returns a plain-text reason instead of JSON.

401

Authorization header present but empty, or rejected by the identity provider.

404

The username or password was not accepted. The identity provider does not distinguish an unknown user from a wrong password, and the passed-through body carries no detail.

409

MFA is already enabled for this user. Enrolment is one-time; removing an existing authenticator so a user can re-enrol requires AUDD.

421

The mfaCode did not match mfaSecretB32. Six well-formed but incorrect digits produce this status, passed through from the identity provider. Retry with a freshly generated code; if it keeps failing, check the client clock for drift.

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json