How do I retrieve the phone number of an incoming SMS sender? I'd like to fetch old records that this SMS sender has sent in the past.
I'm currently doing this on my flask application webhook for Twilio:
@app.route("/")
def hello():
return "Home'!"
@app.route("/sms", methods=['GET','POST'])
def sms_reply():
# Fetch the message
msg = request.form.get('Body')
# Fetch the phone number?? How to do this?
return str(resp)