Verification SMS and OTP Codes | Interweb Mozambique

Try the verification

This demo shows what your customer sees and what our API answers at each step. Nothing is sent here: it is just to show the flow.

Confirm your number

We sent a code by SMS to 84 *** 4567.

Press "Send code" to begin.


                                    

To test for real without using credits, use a Sandbox key: the response includes the code.

Full verification in two requests

Your system does not need to generate or store codes. One request sends the code, another checks what the customer typed.

  1. The customer asks for a code

    On sign-up, login or payment, your system calls POST /v1/sms/otp with the number.

  2. We generate and send it

    The API creates a random code and sends it by SMS at once, ahead of the queue. Only the hash is stored.

  3. The customer types the code

    The customer reads the SMS and types the code on your website or in your app.

  4. We check it

    Your system calls POST /v1/sms/otp/{id}/verify and gets valid, the status and the attempts left.

# 1. POST /v1/sms/otp
201 Created
{ "data": { "id": "otp_3f9a1c...", "status": "pending",
            "to": "25884****567", "attempts_left": 5,
            "expires_at": "2026-11-20T09:35:00+02:00" } }

# 2. POST /v1/sms/otp/otp_3f9a1c.../verify
200 OK
{ "data": { "status": "verified", "valid": true,
            "attempts_left": 4 } }

Rules that fit you, limits built in

Choose the code length, how long it is valid and how many attempts the customer gets. If you don't, we use 6 digits, 5 minutes and 5 attempts.

  • 4 to 8digits in the code
  • 1 to 60minutes of validity
  • 10attempts at most
  • 5codes per number, per hour

Secure end to end

Everything an SMS verification needs, ready to use: from the random code to the check, with protection against guessing and abuse.

  1. Generate, send and check

    One service does all three. Your system only keeps the code's id.

  2. Jumps the queue

    The code SMS goes ahead of the account's other sends and goes out straight away.

  3. We only store the hash

    The code is never stored in plain form, and the check runs in constant time.

  4. Counted attempts

    Every wrong attempt counts. Once the limit is reached, the code fails for good.

  5. Expiry you choose

    The code is valid for 1 to 60 minutes. After that, the check answers "expired".

  6. Abuse limits

    At most 5 codes per number per hour. A new code cancels the previous one.

  7. Your text and your brand

    Write the text with {code} and send it with your Sender ID or NETMSG.

  8. Sandbox with the code

    In Sandbox nothing is sent or charged, and the response includes the code to test the check.

Ready to use in your code

Two requests are enough. Every field except the number is optional.

  • number: the customer's mobile number in Mozambique and Angola, with or without the country code.
  • length: 4 to 8 digits. Default: 6.
  • expires_in: the minutes the code is valid, 1 to 60. Default: 5.
  • max_attempts: the attempts, 1 to 10. Default: 5.
  • text: your text, with {code} once and, optionally, {minutes}.
  • sender: an approved Sender ID. Without it, the free NETMSG is used.

To drop a code, use POST /v1/sms/otp/{id}/cancel. To see its status, GET /v1/sms/otp/{id}.

curl https://api.interweb.co.mz/v1/sms/otp \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: signup-7f3a9c" \
  -d '{"number": "+258841234567", "length": 6,
       "expires_in": 5, "max_attempts": 5,
       "text": "Your code is {code}. Valid for {minutes} min."}'

Where to use SMS verification

Whenever you need to be sure the number really belongs to the customer. All of these examples fit in a single SMS.

  • Payments and wallets

    Payments and wallets

    Confirm payments, withdrawals and transfers before approving them. One code per transaction, with a short expiry.

    Your brandCode 739204 to confirm your payment. Do not share it.
  • Sign-ups and logins

    Sign-ups and logins

    Confirm the number of new sign-ups and protect logins with a second step, with no extra apps.

    Your brandYour login code is 518306. Valid for 5 min.
  • Bookings and deliveries

    Bookings and deliveries

    Confirm bookings, check-ins and the hand-over of orders to the right person.

    Your brandCode 264817 to confirm your booking for 20/12.

Good practice for SMS codes

With these precautions, the code arrives fast, fits in one SMS and is hard for the wrong person to use.

  • 6 digits is the right balance: easy to type and hard to guess.
  • Short expiry, 5 to 10 minutes. The code is for now, not for tomorrow.
  • Few attempts, 3 to 5. After that, request a new code.
  • Short text: without accented letters, an SMS holds up to 160 characters; with letters such as ã or ç, up to 70.
  • "Do not share it" in the text, and never ask for the code by phone or message.
  • With a Sender ID, customers see your brand name and trust the code they get.

SMS cannot receive replies: customers type the code on your website or app, and never reply to the message.

How much does each verification cost?

Each code costs the credits for its SMS, usually one, and the check costs nothing. The price goes down with the number of credits you buy at once.

SMS verificationsPrice per codeTotal
1,000$0.0250$25.00
5,000$0.0225$112.52
10,000$0.0213$212.54
50,000$0.0175$875.18
100,000$0.0150$1,500.30
250,000$0.0138$3,438.19

With 1 SMS per code. Minimum of 1,000 credits per purchase.

F.A.Q Verification SMS

Interweb

The most frequent questions about OTP codes by SMS

It is a one-time password sent by SMS to confirm that the number really belongs to the customer. It is used on sign-up, login, payment or when changing important details.

The code SMS uses credits like any other SMS: one credit per part, from $0.0138. The default text fits in a single SMS. Checking the code uses no credits.

Each wrong attempt counts, and the response says how many are left. Once the limit is reached, which you set from 1 to 10 (5 by default), the code fails and a new one is needed.

Yes. With a Sandbox key, no SMS is sent and nothing is charged, and the send response includes the code itself, so you can test the check in your system.

No. Our API generates the code, sends it by SMS and checks it. Your system only keeps the id it gets back and sends us the code the customer typed.

By default, 5 minutes. You can choose 1 to 60 minutes in the expires_in field. After that, the check answers that the code has expired.

Each account can request at most 5 codes per number per hour. A new code for the same number cancels the previous one. The code is stored only as a hash and the check runs in constant time.

Yes. Put your Sender ID in the sender field. It costs USD 75.02 per name and per country, and the review takes up to 48 business hours. Without it, the code is sent with the free NETMSG.

Lightning OFFER

Web Hosting + FREE Domain **

:
:
:
Stay Online!
keyboard_arrow_up Drag Up
Logo Interweb

Premium OFFER

Web Hosting + FREE Domain **

Offer ends in:
:
:
:
Stay Online!
Close