---
title: Magic Login Twilio Integration
description: "Magic Login allows users to authenticate securely using one-time passwords (OTPs) sent via SMS. This integration uses **Twilio** to send login codes via SMS. Follow the steps below to set up Twilio for Magic Login. ## 📌 Prerequisites Before integrating…"
url: "https://handyplugins.co/docs/magic-login-twilio-integration/"
updated: "2025-03-05"
category: Magic Login Pro
---

# Magic Login Twilio Integration

Magic Login allows users to authenticate securely using one-time passwords (OTPs) sent via SMS. This integration uses **Twilio** to send login codes via SMS. Follow the steps below to set up Twilio for Magic Login.

## 📌 Prerequisites

Before integrating Twilio with Magic Login, ensure you have:

- A **Twilio Account** (Sign up at [Twilio](https://www.twilio.com/)).
- A **Twilio phone number** capable of sending SMS.
- Magic Login PRO installed on your WordPress website.

## Step 1: Create a Twilio Account

1. Go to [Twilio's Sign-Up Page](http://twilio.com/signup).
2. Fill in the required details and verify your email.
3. Complete phone number verification.
4. Select **Twilio (SMS, Voice, Verify, Lookup)** as the usage type.

![](data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=)

## Step 2: Purchase a Twilio Phone Number

To send SMS messages, you need to buy a Twilio phone number.

1. In the Twilio dashboard, go to **Phone Numbers > Buy a Number**.
2. Select a country and ensure the number supports **SMS**.
3. Click **Buy** to purchase the selected number.

![](data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=)

## Step 3: Get Your Twilio API Credentials

1. Once logged into Twilio, navigate to the **Account Dashboard**.
2. Copy the following credentials:
   - **Account SID**
   - **Auth Token**
   - **Twilio Phone Number**

![](data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=)

## Step 4: Configure Twilio in Magic Login

1. Go to your **WordPress Dashboard**.
2. Navigate to **Magic Login > Settings > SMS**.
3. Enter the Twilio credentials:
   - **Account SID**
   - **Auth Token**
   - **From** (Your Twilio phone number)
4. Click **Save Changes**.

![](data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=)

## Step 5: Test SMS Sending

1. Click the **Send a Test SMS** button in Magic Login settings.
2. Enter a test phone number and check if the message is received.

## ✅ Troubleshooting

- **SMS Not Sending?**
  - Ensure your Twilio trial account is upgraded (trial accounts only send messages to verified numbers).
  - Check if your Twilio phone number has **SMS capability**.
  - Verify the **Auth Token** and **Account SID** are correct.
- **Invalid From Number?**
  - Ensure you're using a **Twilio-provided** phone number.
- **Geographic Permissions**

If you are not getting the SMS, make sure your messaging settings on Twilio dashboard. You might need to select your country to get SMS:

![](data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=)
