1. Register demo twilio.com account.

https://www.twilio.com/try-twilio

2. Login the account, get account_sid and auth_token.

3. Install twilio-python

opkg update
opkg install python-openssl
opkg install distribute
easy_install twilio
nano /mnt/sda1/twiliosms.py
#!/usr/bin/python
from twilio.rest import TwilioRestClient
account_sid = "ACXXXXXXXXXXXXXXXXX"
auth_token  = "YYYYYYYYYYYYYYYYYY"
client = TwilioRestClient(account_sid, auth_token)
message = client.messages.create(to="+12125551212", from_="+12125551212",body="Hello there!")

from_="+12125551212" should be your twilio number.

chmod 755 /mnt/sda1/twiliosms.py
/mnt/sda1/twiliosms.py

 

Comments powered by CComment