Sofar logo
Sofar logo
API
Activate email OTP POSTActivate TOTP POSTGet active 2FA methods GETSet or reset email OTP POSTInitiate email OTP challenge POSTInitiate an email address transfer POSTSet or reset TOTP POSTTime until the next email OTP may be generated GETSend a password reset email POSTComplete an email address transfer PUTTime until the next recovery code guess GETDeactivate email OTP DELETEDeactivate TOTP DELETEReset the recovery codes of a user POSTSend a password reset OTP POSTTime until the next TOTP guess GETUpdate password via OTP PUTUpdate password via sudo token PUTCheck a password reset OTP POSTComplete email OTP challenge POSTVerify a recovery code POSTVerify TOTP code POST
User
POST
/user/2fa/recovery-code/authenticate

Authorization

AuthorizationBearer <token>

In: header

Complete email OTP challenge POST

Providing an access token or a partial auth token and an email OTP, acquire a sudo token or a sudo, refresh and access token respectively

Verify TOTP code POST

Providing an access token or a partial auth token and a TOTP, acquire a sudo token or a sudo, refresh and access token respectively

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://authentication.eniris.be/user/2fa/recovery-code/authenticate" \  -H "Content-Type: application/json" \  -d '{    "recoveryCode": "stringstringstri"  }'
{
  "accessToken": "string",
  "refreshToken": "string",
  "sudoToken": "string"
}
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Invalid email address"
}
{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "NO_TOKEN_PROVIDED"
}
{
  "statusCode": 409,
  "error": "Conflict",
  "message": "RECOVERY_CODES_UNINITIALIZED"
}
{
  "statusCode": 429,
  "error": "Too many requests",
  "retryAfter": 0,
  "message": "TOO_MANY_RECOVERY_CODE_CHECKS"
}

Providing an access token or a partial auth token and a recovery code, acquire a sudo token or a sudo, refresh and access token respectively

A valid access token (proof of identity) can be obtained via the /accesstoken endpoint. It has a 5 minutes validity period.

recoveryCode*string
Length16 <= length <= 16