🔢 2FA: TOTP
After a login answering 250 with totp: true. /restv3/ws style: no envelope. Then log in again.
TOTP: verify a code
No envelope: plain JSON.
POST /restv3/ws/auth/totp?v=8.1.0
{
"codeVerification": "123456" // The 6-digit code from the authenticator app
}
Response
{
"cn": "xxxx", // 2FA proof, part 1
"cv": "xxxx" // 2FA proof, part 2
}
TOTP: send a backup code
POST /restv3/ws/auth/totp/secours?v=8.1.0
(no body)
Response
{
"dest": "j***@example.com" // Where the code was sent (masked email or phone)
}
⚙️ Manage TOTP
Logged in. parametresIndividuels.is2FATOTPActivable / is2FATOTPActif tell the state.
TOTP: get the enrolment key
GET /restv3/ws/auth/totp?v=8.1.0
(no body)
Response
{
"cle": "JBSWY3DPEHPK3PXP" // TOTP secret (Base32 text)
}
TOTP: confirm enrolment
POST /restv3/ws/auth/totp?conf=1&v=8.1.0
{
"codeVerification": "123456" // A valid code from the new authenticator
}
TOTP: disable
DELETE /restv3/ws/auth/totp?v=8.1.0
(no body)