Skip to content

Check OTP User

Verify the OTP code sent to user's email during registration.

Endpoint

POST /v1/accounts/otp/user/

Authentication

Not required (public endpoint)

Request Body

{
  "email": "john.doe@example.com",
  "otp": "123456"
}

Parameters

Field Type Required Description Validation
email string Yes User's email address Valid email format
otp string Yes 6-digit OTP code Not empty

Response

Success (200 OK)

{
  "message": "OTP confirmed successfully"
}

After successful verification, the user's account is activated (is_active: true) and they can login.

Error Responses

User Not Found (404)

{
  "error": "User Not Found"
}

Invalid OTP (404)

{
  "error": "User OTP Is Not Correct"
}

Example Request

curl -X POST "https://api.luxmart.site/v1/accounts/otp/user/" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "john.doe@example.com",
    "otp": "123456"
  }'

Notes

  • OTP is a 6-digit code sent to user's email
  • OTP verification activates the user account
  • After activation, user can login using Login User endpoint