Skip to main content

OTP & verification SMS

OTP and verification SMS for sign-in, payments and sign-ups

One-time codes have to arrive in seconds and be trusted. Send them over a priority lane with delivery receipts, so you know when each code reached the handset.

YO YOURBRAND Approved sender ID

Your YOURBRAND code is 482913. It expires in 5 minutes. Never share this code.

09:30 Delivered

482913 is your verification code. Do not share it with anyone.

09:41 Delivered

Why teams send OTPs with LundoSMS

  • Built for urgency

    A priority lane keeps codes moving even while a large campaign is running.

  • A receipt for every code

    Know whether the code arrived, and offer a resend or a fallback if it did not.

  • A sender name people trust

    Customers see your brand instead of an unknown number, so fewer codes are ignored.

  • One credit per code

    A typical OTP fits in a single standard segment, so each code costs one credit.

  • Keys you can restrict

    Scope API keys to what they need and limit them to your server's IP addresses.

  • Easy to integrate

    One HTTPS request per code, with samples in cURL, Node.js, PHP, Python and Go.

How an OTP flow works

  1. 1

    Generate the code

    Create a random code on your server and store it with a short expiry and an attempt limit.

  2. 2

    Send it with one call

    Send the message through the API and keep the returned message ID.

  3. 3

    Check and verify

    Use the delivery receipt to decide whether to offer a resend, then verify what the user types.

Keep your OTP flow safe

  • Generate codes on your server and keep them short-lived — five minutes is common.
  • Limit verification attempts and how often a code can be re-sent.
  • Put only the code and your brand in the message, and tell people never to share it.
  • Use an idempotency key so a retried request never sends a second code.

A code in one request

The same endpoint as any other message, on the priority lane. The idempotency key is the request you are retrying.

POST /v1/messages
curl -X POST 'https://api.lundosms.co.tz/v1/messages' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Idempotency-Key: otp-login-77120' \
  -H 'Content-Type: application/json' \
  -d '{
    "sender_id": "YOURBRAND",
    "recipients": ["255712345678"],
    "message": "Your YOURBRAND code is 482913. It expires in 5 minutes. Never share this code.",
    "client_reference": "LOGIN-77120",
    "type": "transactional"
  }'

OTP questions

What is a sender ID, and how do I get one?

A sender ID is the name customers see instead of a phone number, for example YOURBRAND (up to 11 letters and digits). You request it from your dashboard with a short description and supporting documents. Our team reviews it and, where the networks require it, submits it for approval. You can send as soon as it is approved.

How do I know a message was delivered?

Every message has its own status: queued, sent to network, delivered, or failed. "Sent to network" means the operator accepted the message; "delivered" means the handset confirmed it. You can see statuses in the dashboard, export them, or receive them by webhook or SMPP. A phone that is switched off or out of coverage may receive a message late or never — no provider can guarantee delivery when the operator does not confirm it.

Can I try it before buying credits?

Yes. Create an account, then use a test API key: it goes through the same validation and returns real references, but nothing is sent to a phone and no credits are used.

Ready to reach every phone in Tanzania?

Create your account, register your sender name and send your first message today. Buy the SMS credits you need — they never expire.

Prepaid credits only. Prices in TZS, VAT included.