For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Key
Value
Required

Authorization

Bearer <JWT>

Yes

Content-Type

application/json

Yes

Accept

application/json

Yes

Request Body (JSON)

Field
Type
Description
Required
Example

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

Field
Type
Description
Example

success

boolean

true if OTP is valid, false otherwise.

true

Example Response:

json

Error Responses

  1. Invalid OTP:

    json

  2. Expired OTP:

    json

  3. Missing Authorization:

    json


Notes

  • Token Requirement: Requires a valid JWT from the initial login attempt (provided in Authorization header).

  • OTP Lifetime: Typically valid for 2-5 minutes (depends on system configuration).

  • Success Behavior:

    • If success: true, the user is fully authenticated.

    • The accessToken from the initial login becomes active.

Examples

Real request

{ "code": "951212" }

Real response

200 OK

Last updated