Send OTP

Deliver OTPs to your users via multiple channels such as Whatsapp, voice, and SMS.

📘

NOTE

You would need to register a sender ID with the endpoint mentioned below. All messages sent before then will be delivered with the default sender ID

Request

{{baseUrl}}/messaging/otp/

Body Parameters

ParametersTypeDescriptionMandatory
referenceStringFor tracking messagesOptional
senderStringRegistered SenderRequired
destinationStringPhone number of recipientRequired
lengthIntegerLength of token(4 to 10 characters), default is 6 charactersRequired
expiryIntegerNumber of minutes before token becomes Invalid. Default is 12Optional
channelStringCan be either whatsapp, sms, or voicerequired
otpIntegerLength of token should be between 4-10 digits which is optionalOptional

📘

NOTE

There is the priority feature. You can automatically resend messages via any of the channels if one doesn't get delivered. If the priority is set to true, the default setup is SMS, WhatsApp, and then the voice. You can choose to set it however way you want in the channel parameter.

You can decide to use the OTP parameter to send OTP, instead of the generated one.

Response Sample

{
    "status": true,
    "message": "OTP Sent Successfully To 2348149983395",
    "data": {
        "sender": "Wallx",
        "reference": "DC-DC_d3Eb9Hypl1tuaRLZ",
        "destination": "2348149983395",
        "otp": "926349",
        "channel": "whatsapp",
        "expires_at": "2022-03-15T12:05:41.388713"
    }
}