Second factor with a recovery code: replaces the code session with an mfa-level one
POST
/v1/auth/mfa/recovery
const url = 'https://api.replifier.com/v1/auth/mfa/recovery';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"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://api.replifier.com/v1/auth/mfa/recovery \ --header 'Content-Type: application/json' \ --data '{ "code": "example" }'Ten 10-character codes (XXXXX-XXXXX, case- and hyphen-insensitive); each can be used only once. Shares the attempt count and waits with TOTP (429 code_attempts with Retry-After). Using one sends an email alert and reports how many remain (remainingRecoveryCodes).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
code
required
string
Example generated
{ "code": "example"}Responses
Section titled “Responses”Two-factor session
Media typeapplication/json
object
session
required
object
id
required
string
expiresAt
required
string
authLevel
required
string
remainingRecoveryCodes
required
integer
Example generated
{ "session": { "id": "example", "expiresAt": "example", "authLevel": "example" }, "remainingRecoveryCodes": 1}Invalid data
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Too many attempts
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Internal error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}