Authentication
OTP Verification

OTP Verification

OTP verify for email verification

Endpoint

Base URL
http://localhost:8080
Method and Endpoint
POST /api/users/otp

Request Body

Request Body
{
    "user_id": "unique-user-id",
    "otp": "0000",
}

Responses

You will get responses like this:

200 (success)

Response Body
{
    "message": "Validate OTP successfully!"
}

400 (bad request)

Response Body
{
    "error": "otp code is invalid"
}

500 (server error)

Response Body
{
    "error": "Internal server error"
}

500 (server error)

If something went wrong while update email_verified in database

Response Body
{
    "error": "failed to update email verified"
}