# How to send OTP SMS in Sri Lanka | VeloBotix

> Step-by-step: generate an OTP, send it with the VeloBotix SMS API, expire it, and verify the user on Sri Lankan networks.

Source: https://www.velobotix.app/resources/guides/send-otp-sms-sri-lanka

# How to send OTP SMS in Sri Lanka

1.  Create a VeloBotix account and copy the API key from the portal.
2.  In your backend, generate a 4–6 digit code with a CSPRNG. Save a hash and TTL.
3.  Call SEND\_SINGLE with Basic Auth, your Sender ID, and the user’s 07XXXXXXXX number.
4.  On the verify screen, compare the submitted code to the hash. Increment a retry counter.
5.  Watch DLR/receipts if the user says they never got the SMS.

Full product context: [OTP SMS](https://www.velobotix.app/otp-sms) and [API documentation](https://www.velobotix.app/docs).

## FAQ

### Who generates the OTP?

Your application. VeloBotix only delivers the SMS.

### How long should an OTP live?

Typically 3–5 minutes. Store a hash, not the raw code, if you can.
