Skip to main content

OTP Authentication

Request OTP

Request a one-time password for authentication.

POST /api/user/signin-otp

Request Body

{
"email": "[email protected]",
"PlatformId": "123"
}

Response

{
"message": "OTP sent successfully",
"expiresIn": 300 // seconds
}

Verify OTP

Verify the one-time password and receive an authentication token.

POST /api/user/verify-otp

Request Body

{
"email": "[email protected]",
"otp": "123456",
"PlatformId": "123"
}

Response

{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": 1,
"email": "[email protected]",
"name": "John Doe",
"role": "user",
"status": "active"
}
}