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
GET
/user/2fa

Authorization

AuthorizationBearer <token>

In: header

Response Body

Activate TOTP POST

Activate the current TOTP secret after it was initialized, enabling TOTP as a 2FA method

Set or reset email OTP POST

Providing a sudo token or an access token (if 2FA is disabled), configure a mail address for email OTP

application/json

application/json

curl -X GET "https://authentication.eniris.be/user/2fa"
{
  "enabled": true,
  "emailOtp": {
    "email": "user@example.com",
    "completedAt": "2019-08-24T14:15:22Z"
  },
  "totp": {
    "completedAt": "2019-08-24T14:15:22Z"
  },
  "recoveryCodes": {
    "completedAt": "2019-08-24T14:15:22Z"
  }
}
{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "NO_TOKEN_PROVIDED"
}

Get an object with the active 2FA methods for your account and when they were enabled

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