Two-Factor Authentication (2FA)

Securely verify your users via Voice and SMS in 200+ countries

What is Two-Factor Authentication?

Two-Factor Authentication (2FA) is a secure method of verification that requires the end user to type an unique temporary PIN code they receive via their mobile phone into the application they're trying to access. The PIN can be received via SMS or an automated Voice call. This method of combining a known password to a physical device (i.e., a mobile phone) can greatly improve security and identity verification.

infographic how two-factor authentication (2fa) works

What are two-factor authentication use cases?

Private Messaging

Seamlessly integrate monitoring tools to send alerts to your IT team and escalate issues to the right person. Users: server providers, IT monitoring systems, web-hosting services, etc.

Payment Confirmation

Add two-factor security when your users make large purchases. Instantly confirm purchases and other financial transactions. Users: banks, payment gateways, e-commerce stores, etc.

Employee Access

Prevent data theft, make sure only your employees have access to sensitive company information. Users: enterprises, banks, hospitals, clinics, government agencies, etc.

Server Access

Allow team members to log on to servers from remote locations safely and securely. Users: IT departments, enterprises, banks, hospitals, clinics, government agencies, etc.

How to add Two-Factor Authentication to your user verification process?

Plivo enables you to add two-factor authentication to your application quickly and reliably. We provide examples and Helper Libraries so that you can add the functionality in any web standard languages you need.

Check how simple it is to send an SMS with Plivo

import plivo
class PlivoTwoFactorAuth:
    def __init__(self, credentails, appNumber):
        self.p = plivo.RestAPI(credentails["auth_id"],
        self.appNumber = appNumber
    def getVerificationCode(self, dstNumber, message="__code__"):
        code = random.choice(xrange(100000,999999))
        responseCode, responseData = self.p.send_message({
            "src": self.appNumber,
            "dst": dstNumber,
            "text": message.replace("__code__", str(code)).strip(),
            "type": "sms"
        if responseCode != 202:
            raise Exception
        return code

The example above is written in Python. To learn more details, Check out our sample app and tutorial on Github


Two-Factor Authentication Customer Testimonial by Rich H. from Confide   We chose Plivo because reliability is at the core of our product. Plivo gave us great SMS delivery rates and terrific international coverage for our rapidly expanding global user base.  

Rich H. See how they did it

SMS features available right out-of-the-box

Features Details
Send SMS to 226 countries
Two-way SMS in 20 countries
Unicode .checkmark-in-table
Concatenated Messaging .checkmark-in-table
Delivery Report .checkmark-in-table
SMS Short Codes United States
SMS Short Codes Base Rate 40 messages/sec

Voice features available right out-of-the-box

Features Details
Make voice calls to 208 countries
Two-way voice in 51 countries
Unicode .checkmark-in-table
Dynamic Caller ID .checkmark-in-table
Delivery Reports .checkmark-in-table
Call Recording Free
Text to Speech 19 languages and accents