Skip to main content
Version: API v1

Initiate a new MFA action

POST/v1/mfa/actions/init
API version
v1
Request method
POST
Operation ID
initMfaAction

This resource can be used to initiate a new MFA action. The resulting token can be used to verify the MFA action.

Request​

Responses​

Format
application/json
Description

The process of activating Multi Factor Authentication is initialized. Now you have to confirm it

  • barcodestringrequired

    base64 encoded barcode content to scan from your mfa app. e.g. iVBORw0KGgoAAAANSUhEUgAAAMgAAADIEAAAAADYoy.... You\ncan display it with <img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUh..\" />\n

  • urlstringrequired

    Same as barcode, but in URL form.\n,

Content-Type: application/json

{
"barcode": "string",
"url": "otpauth://totp/mStudio:test@gmail.com?algorithm=SHA1&digits=6&issuer=mStudio&period=30&secret=HTXT7KJFVNAJUPYWQRWMNVQE5AF5YZI2"
}
{
"type": "object",
"required": [
"barcode",
"url"
],
"properties": {
"barcode": {
"type": "string",
"description": "base64 encoded barcode content to scan from your mfa app.\ne.g. `iVBORw0KGgoAAAANSUhEUgAAAMgAAADIEAAAAADYoy...`.\nYou\\ncan display it with `<img\nsrc=\\\"data:image/png;base64,iVBORw0KGgoAAAANSUh..\\\" />`\\n\n"
},
"url": {
"type": "string",
"description": "Same as barcode, but in URL form.\\n,",
"example": "otpauth://totp/mStudio:test@gmail.com?algorithm=SHA1&digits=6&issuer=mStudio&period=30&secret=HTXT7KJFVNAJUPYWQRWMNVQE5AF5YZI2"
}
}
}

Usage examples​

$ curl \
--fail \
--location \
-X POST \
-d '{}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v1/mfa/actions/init

On this page