It's really easy to send an outgoing SMS using Twilio. To send an SMS, make an HTTP POST request to the Messages resource.
POST https://api.twilio.com/2010-04-01/Accounts/AC123456abc/SMS/Messages
Our twilio-python helper library
makes this extremely easy. Open a file called send_sms.py and add the
following lines:
# Download the twilio-python library from http://twilio.com/docs/libraries
from twilio.rest import TwilioRestClient
# Find these values at https://twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXX"
auth_token = "YYYYYYYYYYYYYYYYYY"
client = TwilioRestClient(account_sid, auth_token)
message = client.sms.messages.create(to="+12316851234", from_="+15555555555",
body="Hello there!")
The from_ number must be a valid Twilio phone number. The to number can be
any outgoing number.