SMS API
OTP SMS API

OTP SMS API

Send one-time passwords and verification codes through SMSLeopard when customers sign up, log in, reset passwords, approve transactions, or confirm sensitive actions.

Try this with AI Copilot
Show me how to send OTP SMS messages with the SMSLeopard API
Ask AI →

When To Use OTP SMS

SMS is a strong OTP channel when the customer needs a short, urgent message that works across many phones and connectivity conditions.

Customer momentExample message
Signup verification483921 is your verification code. It expires in 5 minutes.
Login verificationUse 483921 to finish signing in to your account.
Payment approvalConfirm payment KES 4,200 with code 483921.
Password resetUse 483921 to reset your password. Do not share this code.

Recommended Flow

  1. Generate a short-lived OTP in your application.
  2. Store the hashed OTP with an expiry time.
  3. Send the OTP using the SMS API.
  4. Verify the user input against your stored value.
  5. Expire the OTP after use or after the allowed time window.
⚠️

Generate and validate OTPs inside your own application. SMSLeopard delivers the SMS, but your system should own the security rules, expiry, retry limits, and fraud controls.

Endpoint

GEThttps://api.smsleopard.com/v1/sms/send

Example Request

curl -u "$API_KEY:$API_SECRET" \
  "https://api.smsleopard.com/v1/sms/send?message=483921%20is%20your%20verification%20code.%20It%20expires%20in%205%20minutes.&destination=254700000001&source=YOUR_SENDER_ID"

Make OTP Messages Easier To Support

  • Save the recipient message ID returned by the API.
  • Check delivery reports when a customer says they did not receive a code.
  • Use a registered SMS Sender ID where supported.
  • Keep OTP text short, direct, and free of marketing content.

Related Guides