AVC SMS

OTP SMS for Sri Lanka.
Codes that arrive in seconds.

Send login codes, sign-up verification and payment confirmations to Dialog, SLT-Mobitel, Hutch and Airtel numbers with one API call. You generate the code; we get it to the phone.

1 API callper verification code
4 networksDialog · Mobitel · Hutch · Airtel
Rs. 0.60lowest rate per SMS
No premiuman OTP costs the same as any SMS
Why it works

Verification codes your users actually receive.

An OTP that arrives late is a customer who gives up. The API is built to hand codes over quickly and tell you what happened to each one.

  • Handed to the network at onceA single OTP is passed to the mobile network before the API even replies to your server.
  • From your brand nameCodes arrive from your approved sender ID, so customers know the message is yours.
  • A status for every codeCheck any message by its ID, or let a webhook tell your server when it was delivered.
  • Failed codes are refundedIf the network refuses a message, its cost returns to your balance automatically.
How it works

OTP by SMS in four steps.

Your system creates the code

Generate a random 4 to 6 digit code and store it with an expiry time.

One request sends it

POST the phone number and the message to the send endpoint with your API key.

The customer receives it

The SMS arrives from your sender ID, typically within a few seconds.

Your system checks it

Compare what the customer typed with the stored code, then discard the code.

For developers

One request for each code.

The same endpoint sends a single OTP or a campaign. Add your own reference to match the delivery report to a login attempt.

# one request, any number of recipients
curl -X POST https://avcsms.lk/api/v1/sms/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to": "0771234567", "message": "Your OTP is 482913", "sender_id": "MYSHOP"}'
201 Created { "status": "success", "data": { "campaign_id": 120, "accepted": 1, "segments": 1, "messages": [ { "id": 9001, "to": "94771234567", "status": "sent" } ] } }
  • One API key per account, shown in the portal. Restrict it to your server IPs or reset it at any time.
  • The final delivery status is pushed to your webhook, per account or per request.
  • 120 requests a minute per key. Small sends reach the network before we reply.
Read the SMS API reference
Good practice

Getting OTP messages right.

  1. Expire codes quickly. Five minutes is plenty for a real user and leaves little room for misuse.
  2. Keep the message to one part. “Your MYSHOP code is 482913. Valid for 5 minutes.” is all it needs to say.
  3. Name your brand in the text. Together with the sender ID, it lets the customer recognise the code at a glance.
  4. Limit resends. Allow a new code only after a short wait, and cap the attempts for each phone number.
  5. Tell customers not to share it. If your service handles money, say in the message that staff will never ask for the code.
Use cases

Where OTP SMS is used.

Anywhere you need to know that the person really holds the phone number.

Account sign-up

Confirm the mobile number before an account is created.

Two-step sign-in

Ask for a code as well as the password on new devices.

Password reset

Let customers recover an account without calling you.

Payment confirmation

Confirm a transfer, a top-up or a card payment.

Cash-on-delivery orders

Confirm the order is real before you dispatch it.

Account changes

Verify a change of phone number, email or bank details.

FAQ

Questions about OTP SMS.

Something else? Talk to us or call 070 186 3408.

How fast is an OTP SMS delivered in Sri Lanka?
Typically within a few seconds. Single messages are handed to the mobile network before our API replies to your server, so nothing waits in a queue.
How much does an OTP SMS cost?
The same as any other message: Rs. 0.60 to Rs. 0.79 per part depending on your monthly volume. There is no extra charge for OTP traffic.
Does AVC SMS generate and verify the code?
No. Your system generates the code and checks it, which keeps the secret on your side. We deliver the message and report its status.
What happens if a code is not delivered?
You can read the status of every message through the API or a webhook. Messages the network refuses are refunded, and your system can send a fresh code.
Can the OTP come from my brand name?
Yes. Request a sender ID in the portal. Once it is approved, pass it as sender_id or set it as your default.
Can I send OTPs in Sinhala or Tamil?
Yes. Sinhala and Tamil text is detected and sent as Unicode. Keep it under 70 characters to stay within one part.

More from AVC SMS

Add SMS verification to your app.

Create an account, copy your API key and send a test code to your own phone.