Start an authenticator app enrolment
POST
Starts enrolling the logged-in user in MFA with an authenticator app. For users only. The first enrolment needs
no password or mfa_token; later ones need both. Confirm with
Confirm an MFA enrolment.
apiKeyheader
AuthorizationBasic <token>HTTP Basic authentication with your API key or the id of a token as the username and an empty password.
application/json- body
password?stringThe password of the user. Needed when the user already has MFA.
mfa_token?stringA code from a method the user already has. Needed when the user already has MFA.
force_send_sms?booleanSend an SMS code to confirm, when the user has both SMS and an authenticator app.
The enrolment has started.
application/json- response
id?stringThe ID of the enrolment.
otpauth_url?stringThe otpauth:// URL to show as a QR code for the authenticator app.
secret?stringThe secret, for users who add it to the app by hand.
curl -X POST 'https://api.example.com/v1/mfa/enrollment/start/authenticator/' \ --user "$API_KEY:" \ -H 'Content-Type: application/json' \ -d '{ "password": "correct-Horse-battery-7", "mfa_token": "123456"}'{ "id": "845c16de-f627-48cb-bc81-a6b3b1fb134b__bc060460-266e-43f2-a030-e8b8d80126da", "otpauth_url": "otpauth://totp/user%40example.com?secret=EXAMPLESECRET&issuer=Example+platform", "secret": "EXAMPLESECRET"}