API and SMPP

How do I send OTP SMS using the API?

Updated 25 October 2026 · 1 min read

Quick answer

To send OTPs, register an OTP template on DLT, then call the SMS API from your server each time a user needs a code.

Steps

  1. Register an OTP template, for example: {#var#} is your OTP to log in to BrandName. Valid for 10 minutes. Do not share it. - BRAND
  2. Generate the OTP on your server, not in the app or browser.
  3. Call the API with the number, sender ID, template and message.
  4. Store the OTP securely with an expiry time, and verify what the user enters.

Security tips

  • Never send the API key to the browser or mobile app. Call the API from your server.
  • Limit how many OTPs one number or IP can request in a few minutes.
  • Let OTPs expire after a few minutes, and allow a resend only after a short wait.

See OTP message formats and the SMS API page.

Was this answer helpful?Still have a question? Contact our team or WhatsApp us.
Still need help?

Talk to a real person

Our support team helps with DLT, delivery and integrations, Monday to Saturday, 10 AM to 7 PM.