Two-Factor Authentication

Create 2FA method

Changed on

Create a new two-factor authentication method. Requires MANAGE_2FA_METHODS access right.

post/v1/2fa/methods

Request

  • Base URL
    http://127.0.0.1:8000
  • URL
    http://127.0.0.1:8000/v1/2fa/methods
  • Auth
    HTTP bearer

Request body

namestring required

Method name

driverstring required

Driver name (e.g., "TOTP", "Message")

descriptionstring

Method description

configurationobject

Driver-specific configuration

Response

2FA method created successfully

namestring

Method name (unique identifier)

driverstring

Driver name (e.g., "TOTP", "Message")

descriptionstring

Method description

isValidboolean

Whether the method configuration is valid

configurationobject

Driver-specific configuration (structure depends on the driver)

Changes