Otp Verification
This API is used to verify the Mobile number or Email address of the customer.
- application/json
Request Body required
- otp number required
A one-time code sent via SMS or Email.
- source string required
Possible values: [
email
,mobile
]The source to verify.
Responses
- 200
- 400
- 401
Success response
- application/json
- Example
{
"statusCode": 200,
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MzJjMzQ3NTIyNjlmMTJjNTc5NTIyNzMiLCJpYXQiOjE2NjM4NDMyODAsImV4cCI6MTY2Mzg0Njg4MH0.zo2mIgKO_uHYiENpSPhOfMJf_zZFQb66BhB4sjU0Lec",
"tokenType": "Bearer",
"expiresIn": 3600
}
}
Validation error response
- application/json
- Example
{
"statusCode": 400,
"errors": {
"otp": [
"otp must be a number conforming to the specified constraints"
],
"source": [
"source must be a valid enum value",
"source must be a string"
]
},
"message": "Bad Request"
}
Invalid OTP error response
- application/json
- Example
{
"statusCode": 401,
"message": "OTP invalid or expired",
"error": "Unauthorized"
}