Skip to content

Latest commit

 

History

History
118 lines (90 loc) · 3.72 KB

File metadata and controls

118 lines (90 loc) · 3.72 KB

iPhone SMS Filtering - The Real Issue

Problem Identified

Your friend has an iPhone, which has aggressive SMS filtering that blocks messages from unknown numbers, especially automated/business numbers like Twilio.

How iPhone SMS Filtering Works

Filter Unknown Senders (iOS 14+)

iPhones automatically filter SMS from:

  • Unknown business numbers
  • Automated services
  • Numbers not in contacts
  • Numbers flagged as potential spam

Where Filtered Messages Go

Filtered messages go to Messages > Filters > Unknown Senders (not the main inbox).

Immediate Solutions

Solution 1: Check Filtered Messages (Your Friend)

Your friend should check:

  1. Open Messages app
  2. Look for "Filters" at the top
  3. Tap "Unknown Senders"
  4. Look for your verification codes there

Solution 2: Add Number to Contacts (Your Friend)

  1. Find out what Twilio number you're sending from
  2. Have your friend add that number to their contacts
  3. This bypasses the filter completely

Solution 3: Disable SMS Filtering (Your Friend)

  1. Go to Settings > Messages
  2. Turn OFF "Filter Unknown Senders"
  3. All SMS will go to main inbox

How to Find Your Twilio Sending Number

You need to check what number Supabase is configured to send from:

Method 1: Check Supabase Dashboard

  1. Go to your Supabase project dashboard
  2. Navigate to Authentication > Settings > SMS
  3. Look for the configured phone number

Method 2: Check Twilio Console

  1. Go to Twilio Console
  2. Go to Phone Numbers > Manage > Active numbers
  3. Note your SMS-enabled number

Method 3: Create a Debug Endpoint

I can create an endpoint that shows the configured sending number:

// Add to your debug endpoint
export async function GET() {
    return json({
        twilioPhoneNumber: process.env.TWILIO_PHONE_NUMBER || 'NOT_SET',
        twilioMessageServiceSid: process.env.TWILIO_MESSAGE_SERVICE_SID || 'NOT_SET',
        // Note: If using Message Service, the actual sending number may vary
    });
}

Testing the Solution

Step 1: Find the Sending Number

Run this to see what number is configured:

curl -s http://localhost:8080/api/auth/debug-sms-config | jq '.diagnostic.config'

Step 2: Have Friend Check Filtered Messages

Before making any changes, have your friend check Messages > Filters > Unknown Senders.

Step 3: Add to Contacts

Have your friend add the Twilio number to their contacts as "QryptChat Verification" or similar.

Step 4: Test Again

Send another verification code and see if it arrives in the main inbox.

Why This Makes Perfect Sense

This explains everything:

  • Your number works: It's probably in your contacts or you've received from it before
  • Friend's number doesn't work: iPhone filtered it to Unknown Senders
  • API shows success: Twilio delivered it successfully
  • Friend doesn't see it: It's hidden in the filtered folder

Alternative Solutions (If Above Doesn't Work)

Use a Different Twilio Number

Some Twilio numbers are less likely to be filtered:

  • Local area code numbers
  • Numbers with better reputation
  • Toll-free numbers (800, 888, etc.)

Use Twilio Messaging Services

Messaging Services can improve delivery by:

  • Using multiple sending numbers
  • Better carrier relationships
  • Automatic failover

Use Short Codes (Premium)

Short codes (5-6 digit numbers) are:

  • Never filtered by carriers
  • Recognized as legitimate business messages
  • More expensive but 100% reliable

Quick Test

Have your friend:

  1. Open Messages app
  2. Look at the top for "Filters"
  3. Tap "Unknown Senders"
  4. Look for messages from a number like +1XXXXXXXXXX

If the verification codes are there, that's your answer!