Skip to main content
PUT
Regenerate 2FA Backup Codes

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Body

application/json
tfa_method_id
integer

ID of the specific 2FA method to authenticate with; preferred when multiple methods of the same type exist

Example:

3

code
string

Verification code from the chosen 2FA method

Example:

"123456"

secret
string

tfa_secret from the prior send step (required for SMS and email methods)

Example:

"abc123secret"

tfa_method
enum<string>

The 2FA method used to authorize regeneration

Available options:
sms,
totp,
email
Example:

"totp"

backup_code
string

Existing backup code that can be used instead of a normal 2FA code to authorize regeneration

Example:

"ABCD-EFGH-1234"

Response

Returns {msg: "success", backup_codes: [...]} with the 10 new plaintext backup codes.

msg
string

"success"

backup_codes
string[]

List of 10 new plaintext backup codes in XXXX-XXXX-XXXX format