Phone Number / Email Verification
This endpoint is used to verify a phone number or email address by sending One Time Password (OTP) to the provided email address or phone number.
API Request Body
{
"verificationId": "12345abc-67de-89fg-01hi-234567",
"channel": "email",
"to": "[email protected]",
"subject": "OTP Request",
"message": "Your OTP is [code]",
"codePlaceholder": [ "code" ],
"codeExpirationTime": 60
}
OR
{
"verificationId": "12345abc-67de-89fg-01hi-234567",
"channel": "phone",
"to": "+2347035592939",
"message": "Your OTP is [code]",
"codePlaceholder": [ "code" ],
"codeExpirationTime": 60
}
Field | Description | Type |
---|---|---|
VerificationId | The verification id from the initialized verification | string |
channel | The medium to use for the verification | string |
to | The recipient’s email address or phone number | string |
subject | The email subject | string |
message | The OTP message with the code placeholder | string |
codePlaceholder | The code placeholder in the message that will be replaced by the OTP code | string |
codeExpirationTime | An optional code expiration time in seconds | number |
API Response
{
"message": "Ok",
"data": {
"to": "[email protected]",
"channel": "email",
"status": "Sent"
}
}
Updated about 2 years ago