Skip to content

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 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.