Ruka hadi maudhui makuu

Tafsiri inakuja — ukurasa huu unaonyeshwa kwa Kiingereza wakati tafsiri ya Kiswahili inaandaliwa. Soma kwa Kiingereza

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 Jina la mtumaji lililoidhinishwa

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

09:30 Imefika

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

09:41 Imefika

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

Jina la mtumaji (sender ID) ni nini, na ninalipataje?

Jina la mtumaji ni jina ambalo wateja wanaliona badala ya namba ya simu, kwa mfano JINALAKO (hadi herufi na tarakimu 11). Unaliomba kupitia dashibodi yako kwa maelezo mafupi na nyaraka zinazothibitisha. Timu yetu inalikagua na, pale mitandao inapohitaji, inaliwasilisha ili liidhinishwe. Unaweza kutuma mara tu linapoidhinishwa.

Nitajuaje kama ujumbe umefika?

Kila ujumbe una hali yake: uko kwenye foleni, umetumwa kwenye mtandao, umefika, au umeshindikana. "Umetumwa kwenye mtandao" inamaanisha mtandao umeukubali ujumbe; "umefika" inamaanisha simu ya mpokeaji imethibitisha. Unaweza kuona hali hizi kwenye dashibodi, kuzipakua, au kuzipokea kwa webhook au SMPP. Simu iliyozimwa au isiyo na mtandao inaweza kupokea ujumbe baadaye au isiupokee kabisa — hakuna mtoa huduma anayeweza kuhakikisha kufika pale mtandao usipothibitisha.

Naweza kujaribu kabla ya kununua salio?

Ndiyo. Fungua akaunti kisha tumia ufunguo wa API wa majaribio: unapitia ukaguzi uleule na kurudisha marejeo halisi, lakini hakuna kinachotumwa kwenye simu na hakuna salio linalotumika.

Uko tayari kufikia kila simu nchini Tanzania?

Fungua akaunti, sajili jina la mtumaji na utume ujumbe wako wa kwanza leo. Nunua salio la SMS unalohitaji — halikwisha muda.

Unalipia salio kabla ya kutumia. Bei kwa TZS, VAT imejumuishwa.