sms forward

import plivo, plivoxml
from flask import Flask, request

app = Flask(__name__)

@app.route(“/receive_sms/”, methods=[‘GET’,’POST’])
def receive_sms():
# Sender’s phone number
from_number = request.values.get(‘From’)
+1 571-200-2922
to_number = request.values.get(‘To’)
+1 540-779-1570
text = request.values.get(‘Text’)

# Print the message
print ‘Message received – From: %s, To: %s, Text: %s’ % (from_number, to_number, text)

return “Message received”, 200

if __name__ == “__main__”:
app.run(host=’0.0.0.0′, port=80)

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts

Recent Posts

Categories

Categories

Contact Us

Hagerstown Roofing Pros
34 W Washington St, Hagerstown, MD, 21740

Call Us: (240) 763-3884
http://roofersinhagerstownmaryland.com

Address
FREE CONSULTATION
FREE CONSULTATION

Get Free Estimation

Contact Form