Send With SES
Visit Website
  • What is Send With SES ?
  • Why Send With SES ?
  • Get Started
  • Pricing
  • Features
    • Contacts
    • Email
    • SMS
    • Push Notifications
    • Team Inbox
  • FAQs
    • Email FAQs
      • How Many Emails Can I Send ?
      • Email Delivery Times.
      • Email Bounces & Complaints.
      • Do I Need A Domain To Send Emails With Amazon SES ?
    • SMS FAQs
      • SMS Deliverability
    • Push FAQs
    • Dedicated Account Manager
  • DOCUMENTS
    • Services and Privacy Terms.
    • Billing & Refund Policy
  • AWS Pinpoint Alternative
  • Send With SES Alternatives
  • 🅱️Random Stuff
    • Easy to Remember Color Guide for Non-Designers
    • The internet is an SEO landfill
    • Simple Startup Cashflow Projections (Spreadsheet)
    • Feedback Noise
    • Enemy At The (Billing) Gates
    • Stripe Country Comparison (Spreadsheet)
    • Startup VS Restaurant
  • HOW TO's
    • Getting Started
    • AWS Setups
      • Create Free AWS Account.
      • Create AWS Role
      • Generate AWS Keys.
    • EMAIL
      • Add/Edit DNS Records
      • Move Out of SES Sandbox and Increase AWS SES Limits.
      • Email Collection Popup.
      • Custom HTML
    • SMS
      • Move Out of SMS Sandbox
      • OTP SMS
    • Push Notifications
Powered by GitBook
On this page
  • Happy and time saving news for you!
  • Every SMS is transparently tracked along with the cost.
  • No Extra Charges.
  1. HOW TO's
  2. SMS

OTP SMS

PreviousMove Out of SMS SandboxNextPush Notifications

Last updated 1 year ago

Using OTP's (One Time Passwords) for Sign-up, Sign-in, and 2FA (Two Factor Authentication) has become quite mainstream. You know how it works. You send a code to the mobile number of your end user. They enter that code in your app. You verify whether it is the correct code and let the user sign-in or sign-up or do whatever.

The whole process involves a few steps in case you wish to roll it on your own. It's not very complicated, but you still need to wrangle some code.

  1. Random Code Generator: A small script that generates a random 'time bound one time password (OTP)'.

  2. Send Script: To trigger an OTP SMS based on user input. (Pro Tip: The OTP SMS needs to be delivered on the 'Transactional Route')

  3. Verify Script: When a user sends you back the OTP, you need to verify it's correctness and expiry time bound (say 5 minutes).

  4. Database: A DB table where you store the OTP sent along with the timestamp for later verification.

  5. Rate Limiting: So that a rouge agent does not request too many SMS's that shoot up your bill.

Happy and time saving news for you!

The SMS module in Send With SES now comes with a 'OTP SMS Template' to handle all the above for you. You edit the template to suit your requirement ...

... and then trigger the Send API ...

// Send API
{
      "method": "POST",
      "url": "https://api.sendwithses.com/send-otp",
      "headers": {"template-key": "a2aa10a6S7SDRBzRODj09OkeXelA2"},
      "body": {
          "sender_id": "ABCDEF"
          "origination_number": "+449876543212"
          "mobile": "+449876543210",
       }
}

... followed by the Verify API.

// Verify API
{
      "method": "POST",
      "url": "https://api.sendwithses.com/verify-otp",
      "headers": {"template-key": "a2aa10a6S7SDRBzRODj09OkeXelA2"},
      "body": {
          "mobile": "+449876543210"
          "otp": "123456",
       }
}

Every SMS is transparently tracked along with the cost.

No Extra Charges.

Starting 1-Nov-2021, this feature has been enabled for all users. There are no extra charges for using the OTP SMS feature. You only pay the that is charged directly by AWS to you.

Don't have a Send With SES account? You can .

SMS cost
signup for the free plan