21660: Mismatch between the 'From' number and the account
MESSAGING
ERROR
This error occurs when the From sender in your SMS request is not owned by the account or subaccount identified by the credentials in the API request. The from value must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you send with MessagingServiceSid, you can omit from and let Twilio select a sender from the Messaging Service's Sender Pool.
- You sent the request with the wrong Account SID, Auth Token, or API Key, so the request was authenticated against a different account or subaccount than the one that owns the sender.
- The
Fromphone number belongs to another subaccount or to the parent account, but your request used credentials for a different account. - The phone number was transferred between accounts or subaccounts, but your application still uses the previous account credentials.
- You included
fromin a request that also usesMessagingServiceSid, and the specified sender does not belong to the same account that is creating the message.
- Verify that the credentials in your API request match the account or subaccount that owns the sender you want to use.
- In Console, confirm that the
Fromnumber is provisioned, hosted, or otherwise assigned to the same account that is creating the message. - If you send messages from a subaccount, use that subaccount's credentials when creating the message.
- If the number was moved to a different subaccount, update your application to use the new account credentials or transfer the number to the account that should send the message.
- If you use
MessagingServiceSid, omitfromto let Twilio choose a sender from the Messaging Service's Sender Pool. If you specifyfrom, use a sender that belongs to the same account creating the message.