POST
/
api
/
v1
/
messaging
/
otp
curl --request POST \
  --url https://api.dojah.io/api/v1/messaging/otp \
  --header 'AppId: <appid>' \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "sender_id": "<string>",
  "destination": "<string>",
  "channel": "<string>",
  "length": {},
  "priority": true
}'
{
  "entity": [
    {
      "reference_id": "fd2a5c3c-f62f-484d-bc19-410f3483c6f6",
      "destination": "09098377027",
      "status_id": "dj_e2f21121-feee-3740-854f-8bb2db378fe1",
      "status": "whatsapp/voice/sms OTP sent successfully "
    }
  ]
}

What is an OTP?

OTP means One Time Password. It is an automatically generated numeric or alphanumeric string of characters that authenticates a user for transactions

Send OTP endpoint will deliver OTPs to your users via SMS, WhatsApp or Voice Channels.

AppId
string
required

Application ID from dashboard

BODY PARAMS

sender_id
string
required

Registered Sender ID

destination
string
required

Mobile number to receive message. Multiple numbers should be separated by comma

channel
string
required

Either or any of the following can be used. sms, whatsapp,voice

length
int32

Length of token should be between 4-10 digits which is optional

priority
boolean

Indicate if you want to send with the priority mode. Default is false

RESPONSES

200
json

json

400
Object
401
Object
{
  "entity": [
    {
      "reference_id": "fd2a5c3c-f62f-484d-bc19-410f3483c6f6",
      "destination": "09098377027",
      "status_id": "dj_e2f21121-feee-3740-854f-8bb2db378fe1",
      "status": "whatsapp/voice/sms OTP sent successfully "
    }
  ]
}

Was this page helpful?