How to send OTP SMS in Sri Lanka
- Create a VeloBotix account and copy the API key from the portal.
- In your backend, generate a 4–6 digit code with a CSPRNG. Save a hash and TTL.
- Call SEND_SINGLE with Basic Auth, your Sender ID, and the user’s 07XXXXXXXX number.
- On the verify screen, compare the submitted code to the hash. Increment a retry counter.
- Watch DLR/receipts if the user says they never got the SMS.
Full product context: OTP SMS and API documentation.
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.