Should you notice any errors in our documentation, please don’t hesitate to contact us. Thank you!
| Previous flow | OTP-based flow | |
|---|---|---|
| Username/password login | Token pair returned immediately | OTP verification required before tokens are issued |
| API token authentication | No OTP | No OTP (unchanged) |
| Auth response body | token_type, access_token, refresh_token | Additionally contains auth_status |
{
"accessors": ["voucher_owner"],
"identifier": "<user_email>",
"password": "<user_password>"
}{
"meta": null,
"data": {
"token_type": null,
"access_token": null,
"refresh_token": null,
"auth_status": "otp_required"
}
}auth_status with the value "otp_required" indicates that an OTP is required to complete authentication.token_type, access_token, and refresh_token are null.otp attribute with the 6-digit code from the e-mail:{
"accessors": ["voucher_owner"],
"identifier": "<user_email>",
"password": "<user_password>",
"otp": "123456"
}auth_status set to "authenticated":{
"meta": null,
"data": {
"token_type": "bearer",
"access_token": "ey...",
"refresh_token": "ey...",
"auth_status": "authenticated"
}
}unauthorized error. Note that a successful otp_required response in Step 1 already confirms that the credentials themselves are correct, so an unauthorized error in Step 3 typically indicates an invalid or expired OTP.otp attribute (Step 1). This triggers a new OTP e-mail.data.auth_status in the response instead of expecting tokens immediately.auth_status is "otp_required", prompt the user for the 6-digit code sent to their e-mail address.otp field.auth_status is "authenticated".unauthorized errors in the OTP step, e.g. by allowing the user to re-enter the code or restart the flow to receive a new OTP.