pythonflasktwiliotwilio-apitwilio-python

Receiving Twilio messages from a shortcode in a webhook instead of phone number


I have managed to set up my Twilio account (and a Flask server) and while following along the How to Create a SMS Conversation in Python tutorial I'm receiving the response message from a shortcode instead of my assigned Twilio number (see below).

I would like to receive messages from my Twilio assigned number and not from a random shortcode. Is there a setting in the Twilio console to achieve this? (Other users have posted similar questions, but so far I haven't found any solution to this.)

I'm able to send and receive messages and the webhook is properly configured, but when I receive the message, it is from shortcode 50000 instead of my actual Twilio number.

SMS Response from webohook

Any help would be appreciated. Thanks!


Solution

  • Summarizing the comments above as an answer:

    This is likely related to the messaging route used when sending messages between different country codes. You should try using numbers from the same country and consider using a shortcode available for their country. Twilio support suggested trying a Mexico - Short Code - SMS type for the specific case mentioned.

    There's more context in this answer.