Magento 2 Two Factor AuthenticationMagento 2 Two Factor Authentication
Live Demo
Buy Now
Support
Live Demo
Buy Now
Support
  • Getting Started

    • Introduction
    • Requirements
    • Installation
  • Third-Party Setup

    • Twilio Setup
    • Firebase Setup
  • Configuration

    • Admin Configuration
    • i18n Translation
  • Authentication Channels

    • SMS Authentication
    • Email OTP
    • Email Verification Link
    • Push Notification
    • TOTP Authenticator App
  • Security & Recovery

    • Backup Recovery Codes
    • Brute-Force & Lockout
    • Admin Management & Unlock
  • Help

    • Troubleshooting
    • FAQ & Support

Twilio Setup for SMS OTP

When using Mobile as your two-factor authentication channel, the module uses Twilio to deliver one-time authentication codes directly to customer mobile numbers.


Prerequisites

  • An active account on Twilio.
  • A Twilio SMS-enabled phone number.

Step 1: Create or Sign In to Twilio Account

  1. Visit Twilio and sign in to your console (or click Sign Up to create an account).

Twilio Registration

  1. Complete your email and mobile verification.

Step 2: Retrieve API Credentials

From your main Twilio Console dashboard:

  1. Locate the Account Info section.
  2. Note your Account SID (used as Auth ID in Magento).
  3. Click the reveal icon to copy your Auth Token (used as Token in Magento).
  4. Note your Twilio Phone Number (used as Sender Number in Magento).

Twilio Dashboard Credentials


Credential Mapping Reference

Twilio Console FieldMagento Two Factor Auth SettingNotes
Account SIDAuth IDUnique 34-character string starting with AC
Auth TokenTokenSecret 32-character authentication token
Twilio Phone NumberSender NumberE.164 formatted sender number (e.g., +1234567890)

Next Steps

Once you have gathered these three credentials, proceed to Admin Configuration to enter them into Magento and customize your SMS message template.

Next
Firebase Setup