21910: Invalid 'From' and 'To' pair. 'From' and 'To' should be of the same channel
MESSAGING
ERROR
This error occurs when you send a Message resource request where From and To use different channel address formats. Twilio requires channel-specific addressing, such as an E.164 phone number for SMS or MMS and whatsapp:+15558675310 for WhatsApp.
- You sent from an SMS or MMS sender in
E.164format, but the destination is a WhatsApp address such aswhatsapp:+15558675310. - You sent from a WhatsApp-enabled sender, but the destination is a plain phone number instead of a WhatsApp address with the
whatsapp:prefix. - One of the channel addresses is formatted incorrectly for the channel you intend to use. For WhatsApp, both sender and recipient addresses must include the
whatsapp:prefix.
- Make sure
FromandToare on the same channel before you send the request. For SMS or MMS, use phone numbers inE.164format for both values. - For WhatsApp, set
Fromto your approved WhatsApp sender address and setToto the recipient's WhatsApp address. Prefix both values withwhatsapp:. - Verify that the
Fromvalue belongs to your Twilio account and is valid for the channel you are using. Twilio only accepts afromsender that is hosted within Twilio and belongs to the account creating the message. - If you send with
MessagingServiceSid, omitFromso Twilio can select a sender from the Messaging Service's Sender Pool. For channel destinations such as WhatsApp, add a sender for that same channel to the Messaging Service.