Here we will be using 2FACTOR authentication API to send OTP from Rails application. With free trial account you will get 100 OTP SMA balance. Follow below steps to get started!

Create a new 2FACTOR account

Visit 2FACTOR portal and create your free trial account using your email address and phone number. A unique API key will be generated for your account. You can get this API key in Manage Account > Account Summary section on home page. This API key will be used to call 2FACTOR API’s.

We will be using Net::HTTP to call 2FACTOR API’s.

Create Service class…

Akashkinwad

Ruby on Rails + ReactJs Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store