SENDUNE Docs
Blogsendune.com
  • 🎩What
  • ❓Why
  • Open Source
  • 🐢Get Started
  • 😙Contacts
  • 📧Email
  • 📳SMS
  • 🔢OTP
  • API Reference
  • 🤖Email Automation
  • 📮InboxVISA™
  • 🗳️Customer Support Popup
  • 📊Delivery Stats
  • 👀Audit Logs
  • 🧑‍🤝‍🧑Team Management
  • 📬Team Inbox
Powered by GitBook
On this page

Was this helpful?

OTP

PreviousSMSNextAPI Reference

Last updated 9 months ago

Was this helpful?

One Time Password (OTP ) is a special type of Transactional SMS (Text Message). OTP's are used to send one time codes intended for Login or Two-Factor Authentication (2FA) or other high value transactions.

OTP SMS has a template that allows you to customise fields like App Name, OTP Size, and OTP Expiry Time.

The OTP SMS has two parts, Send API and Verify API.

Send API is used to trigger the SMS containing one time code to the end user.

URL: https://api.sendune.com/send-otp

Request:

{
      "method": "POST",
      "url": "https://api.sendune.com/send-otp",
      "headers": {"template-key": "****************************elA2"},
      "body": {
          "sender_id": "ABCDEF"
          "origination_number": "+449876543212"
          "mobile": "+449876543210",
       }
}

Success Response:

{
      "success": true,
      "message": "OTP Sent"
}

Failed Response:

{
      "success": false,
      "message": "message details",
      "error": "error details"
}

IMPORTANT:

  • All API calls MUST include the Template Key. Template Key is unique to OTP SMS.

  • 'Origination Number' is required only when sending to USA mobile numbers.

  • All mobile numbers MUST STRICTLY be in E.164 format.

Verify API is used to match the one time code received from end user with the code generated during the Send API call.

URL: https://api.sendune.com/verify-otp

Request:

{
      "method": "POST",
      "url": "https://api.sendune.com/verify-otp",
      "headers": {"template-key": "***********************elA2"},
      "body": {
          "mobile": "+449876543210"
          "otp": "123456",
       }
}

Success Response:

{
      "success": true,
      "message": "OTP Verified"
}

Failed Response:

{
      "success": false,
      "message": "message details",
      "error": "error details"
}

IMPORTANT:

  • All API calls MUST include the Template Key. Template Key is unique to OTP SMS.

  • 'Origination Number' is required only when sending to USA mobile numbers.

  • All mobile numbers MUST STRICTLY be in E.164 format.

🔢