MFAController

Create a TOTP device from an OTP Auth URL

Create a virtual TOTP device for a given OTP Auth URL such as otpauth://totp/MyApp:alice@example.com?secret=ABC123&issuer=MyApp&period=30&digits=6&algorithm=SHA1. You can provider overrides in the options for each component of the URL.

post/mfa/totp/device/otpAuthUrl

Request

  • Base URL: https://api.mailslurp.com
  • URL: https://api.mailslurp.com/mfa/totp/device/otpAuthUrl
  • Auth: API key in header x-api-key

Request body

otpAuthUrlstring required

OTP Auth URI for connecting a TOTP device.

namestring nullable

Name for labeling the TOTP device

usernamestring nullable

Optional username for the TOTP device

issuerstring nullable

Optional issuer override for the TOTP device

digitsinteger nullable

Optional number of digits in TOTP code

periodinteger nullable

Optional period in seconds for TOTP code expiration

algorithmstring nullable

Optional algorithm override

Example request

{
  "otpAuthUrl": "otpauth://totp/your-app:contact%40mailslurp.dev?secret=LJCTOYKGGBAWCMSHJRZGITCVLIXCG4JY&issuer=your-app&algorithm=SHA1&digits=6&period=30",
  "algorithm": "SHA1"
}

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.