Whatsapp Twilio avatar
Whatsapp Twilio

Pricing

Pay per event

Go to Apify Store
Whatsapp Twilio

Whatsapp Twilio

Twilio WhatsApp Message Sender allow the agent to Send WhatsApp messages using Twilio's official WhatsApp Business API - the most reliable and legitimate way to send WhatsApp messages programmatically.

Pricing

Pay per event

Rating

0.0

(0)

Developer

christopher athans crow

christopher athans crow

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

2

Monthly active users

3 hours ago

Last modified

Share

Twilio WhatsApp Message SenderSend

WhatsApp messages using Twilio's official WhatsApp Business API - the most reliable and legitimate way to send WhatsApp messages programmatically.

Why Use Twilio?

Official WhatsApp Business API - Legitimate and supported by WhatsApp ✅ No IP blocking issues - Works from any server, including Apify ✅ No QR code authentication - Set up once, use forever ✅ Reliable delivery - Enterprise-grade message delivery ✅ No account ban risk - Complies with WhatsApp's Terms of Service ✅ Support for media - Send images, videos, documents ✅ Delivery status tracking - Know when messages are delivered/read

Setup Instructions

Step 1: Create Twilio Account

  1. Go to twilio.com/try-twilio
  2. Sign up for a free account (comes with $15 credit)
  3. Verify your email and phone number

Step 2: Set Up WhatsApp Sandbox (Free Testing)

For testing (free):

  1. Go to console.twilio.com/us1/develop/sms/try-it-out/whatsapp-learn
  2. Follow instructions to join the sandbox:
    • Send a WhatsApp message to Twilio's sandbox number
    • Message format: join <your-sandbox-code>
    • Example: Send "join happy-cat" to +1 415 523 8886

Your sandbox WhatsApp number will be: whatsapp:+14155238886

Step 3: Get Your Credentials

  1. Go to console.twilio.com
  2. Find your Account SID and Auth Token on the dashboard
  3. Note down your WhatsApp sandbox number (e.g., whatsapp:+14155238886)

Step 4: Configure Actor Input

{
"twilioAccountSid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"twilioAuthToken": "your_auth_token_here",
"twilioWhatsAppNumber": "whatsapp:+14155238886",
"toPhoneNumber": "whatsapp:+15593178928",
"message": "Hello from Twilio WhatsApp!"
}

Important: Recipient must have joined your sandbox first (by sending the join code).

Production Setup (Approved WhatsApp Business Account)

For production use (sending to any number without sandbox):

  1. Apply for WhatsApp Business API access in Twilio Console
  2. Submit your business information for approval
  3. Once approved, you'll get your own WhatsApp Business number
  4. Use that number in place of the sandbox number

Cost: Pay-as-you-go pricing (check twilio.com/whatsapp/pricing)

Input Parameters

ParameterRequiredDescription
twilioAccountSidYour Twilio Account SID
twilioAuthTokenYour Twilio Auth Token
twilioWhatsAppNumberFormat: whatsapp:+14155238886
toPhoneNumberFormat: whatsapp:+15551234567
messageMessage text to send
mediaUrlOptional URL to image/video/document

Example with Media

{
"twilioAccountSid": "ACxxxxxxxx",
"twilioAuthToken": "your_token",
"twilioWhatsAppNumber": "whatsapp:+14155238886",
"toPhoneNumber": "whatsapp:+15593178928",
"message": "Check out this image!",
"mediaUrl": "https://demo.twilio.com/owl.png"
}

Output

The actor saves results to the dataset:

{
"phoneNumber": "whatsapp:+15593178928",
"message": "Hello from Twilio WhatsApp!",
"status": "sent",
"timestamp": "2025-01-05T10:30:00.000Z",
"messageSid": "SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"twilioStatus": "queued"
}

Twilio vs Baileys Comparison

FeatureTwilio (This Actor)Baileys (whatsapp_sms)
Reliability✅ Enterprise-grade⚠️ Unstable, may break
IP Blocking✅ No issues❌ Blocked on Apify
Setup✅ Simple, one-time❌ Complex, needs local auth
WhatsApp ToS✅ Compliant❌ Violates ToS
Account Ban Risk✅ No risk⚠️ High risk
Cost💰 Paid ($0.005/msg)💰 Free but risky
Support✅ Official support❌ Community only
Media Support✅ Yes✅ Yes
Production Ready✅ Yes❌ No

Troubleshooting

"Unable to create record: Invalid 'To' Phone Number"

  • Recipient must join your sandbox first (send the join code)
  • Ensure phone number format is whatsapp:+15551234567 (with whatsapp: prefix)

"Authenticate with Twilio"

  • Check your Account SID and Auth Token are correct
  • Make sure there are no extra spaces

"Not enough balance"

  • Free trial accounts have $15 credit
  • Add payment method for continued use

Pricing

  • Sandbox: Free for testing
  • Production: ~$0.005 per message (varies by region)
  • Setup fee: One-time fee for approved WhatsApp Business number
  • Check current pricing: twilio.com/whatsapp/pricing