Start a TOTP enrolment with a session or a pending login
const url = 'https://example.com/v1/auth/totp/enrol';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"mfa_token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/auth/totp/enrol \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "mfa_token": "example" }'Starts enrolment from an authenticated session or a primary-verified pending login. Returns the secret and QR once; replacing a factor requires AAL3.
Authorizations
Section titled “ Authorizations ”- bearerAuth
- browserSession
- None
Request Body required
Section titled “ Request Body required ”object
Example generated
{ "mfa_token": "example"}Responses
Section titled “ Responses ”OK
object
Example generated
{ "algorithm": "example", "digits": 1, "period": 1, "qr_png_base64": "example", "secret": "example", "uri": "example"}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}