Implementation: How to handle Twilio sandbox vs production WhatsApp numbers?
Documentation for Sessions
⚙️ Implementation: How to handle Twilio sandbox vs production WhatsApp numbers?
Date: 2026-02-20
Time: 15:38:33 UTC
Session: gspace1-128.7
Agent: angular
Confidence: 100%
Status: ✅ Documented
📋 Decision Context
Question:
How to handle Twilio sandbox vs production WhatsApp numbers?
Task: Not specified
🎯 Decision Made
Chosen:
Separate TWILIO_NUMBER (production) and TWILIO_SANDBOX_NUMBER env vars with auto-selection
Options Considered:
- Single TWILIO_WHATSAPP_NUMBER env var (must change for sandbox vs production)
- Separate TWILIO_NUMBER (production) and TWILIO_SANDBOX_NUMBER env vars with auto-selection
💭 Reasoning
Twilio sandbox requires FROM=+14155238886 (shared sandbox number), production uses the purchased number +16073056767. Having both env vars lets TwilioService auto-select based on TWILIO_WHATSAPP_MODE=sandbox|production. No code changes needed to switch — just change the mode env var. TWILIO_NUMBER was renamed from TWILIO_WHATSAPP_NUMBER since the number is shared across WhatsApp and SMS.
📁 Files Involved
- No files specified
🔗 Related
- Decision ID:
dev_1771601913477_gbhi5sv - Session: 128
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation