Skip to contentSkip to navigationSkip to topbar
Page toolsOn this pageProducts used
Looking for more inspiration?Visit the

21265: 'To' number cannot be a Short Code


ERROR: 21265

error-21265 page anchor
MESSAGING
ERROR

This error occurs when you attempt to send an SMS to a short code in the To parameter. Short codes are numeric sender IDs with three to seven digits, and Twilio phone numbers cannot send messages to short codes, whether the short code is hosted by Twilio or by another provider.

Possible causes

possible-causes page anchor
  • The To value is a short code instead of a standard destination phone number.
  • Your application stored or collected a three to seven digit short code as the recipient address and attempted to use it in an outbound SMS request.
  • Your workflow is trying to reply to a message that originated from a short code by sending a new outbound SMS from a Twilio phone number to that short code.
  • Send the message to a full recipient phone number instead of a short code. Do not use a short code in the To parameter for outbound SMS from a Twilio phone number.
  • Validate destination numbers before you send. If your use case expects a mobile or landline number, reject recipients that match short code formats such as three to seven digits.
  • Review the source of your recipient data and remove short codes from contact lists, inbound reply handling, and automated message workflows that send through Twilio phone numbers.
  • If you need to receive messages from short codes on a Twilio long code, configure your account for inbound short code reception instead of attempting to send outbound messages to the short code. This setting is account-wide and requires contacting Twilio Support.

Additional resources

additional-resources page anchor