Otp Confirm
Verifies a one-time password (OTP) for two-factor authentication (2FA) and completes the login process. Returns success status upon valid OTP confirmation.
Endpoint
POST/v2/auth/otp/confirm
Link
Request
Headers
Authorization
Bearer <JWT>
Yes
Content-Type
application/json
Yes
Accept
application/json
Yes
Request Body (JSON)
code
string
OTP code (e.g., from SMS/authenticator app).
Yes
"123456"
Example Request Body:
json
Response (200 OK)
Returns a success flag indicating OTP verification status.
Response Fields
success
boolean
true if OTP is valid, false otherwise.
true
Example Response:
json
Error Responses
Invalid OTP:
json
Expired OTP:
json
Missing Authorization:
json
Notes
Token Requirement: Requires a valid JWT from the initial login attempt (provided in
Authorizationheader).OTP Lifetime: Typically valid for 2-5 minutes (depends on system configuration).
Success Behavior:
If
success: true, the user is fully authenticated.The
accessTokenfrom the initial login becomes active.
Examples
Real request
{
"code": "951212"
}
Real response
200 OK
Last updated

