One-time passwords (OTPs) are just SMS with time-sensitive content. Send them like any other message, over the API or SMPP.

curl -X POST https://sms.esmsafrica.io/api/messages/send \
  -H "Authorization: Bearer esms_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"to":"+254712345678","text":"Your code is 482910","sender_id":"MyApp"}'

Use an API key from Developers > API Keys in the eSMS App. In Ghana, Uganda, Kenya, Tanzania, Cote d'Ivoire, Rwanda, DR Congo and Nigeria you can leave sender_id out to use the default sender. Everywhere else you must register your own sender ID. To have eSMS generate, send and check the code for you, use eSMS Verify (POST https://sms.esmsafrica.io/api/verify/start and /api/verify/check).

OTPs are prioritised on our direct operator routes for fast delivery. Register a branded Sender ID so recipients trust the code.

Step-by-step guide with screenshots: Send and check OTPs with eSMS Verify.