@app.route('/sms/send')
def send_sms():
 to = request.args.get('to')
 if (not to):
  return ('Please provide the number to message in the "to" query string parameter.', 400)
 client = TwilioRestClient(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN)
 rv = client.messages.create(to=to, from_=TWILIO_NUMBER, body='Hello from Twilio!')
 return str(rv)

@ app . route ( '/sms/send' ) def send_sms ( ) : to = request . args . get ( 'to' ) if ( not to ) : return ( 'Please provide the number to message in the "to" query string parameter.' , 400 ) client = TwilioRestClient ( TWILIO_ACCOUNT_SID , TWILIO_AUTH_TOKEN ) rv = client . messages . create ( to = to , from_ = TWILIO_NUMBER , body = 'Hello from Twilio!' ) return str ( rv )
sends a simple sms message .