-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtext.py
24 lines (16 loc) · 804 Bytes
/
text.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from twilio.rest import TwilioRestClient
account_sid = "----------------------"
auth_token = "-----------------------"
client = TwilioRestClient(account_sid, auth_token)
message = client.messages.create(
to = "+----------",
from_= "+-----------",
body = "Text Here")
"""
NOTES:
# Get infomration!
Nick$ curl https://api.twilio.com/2010-04-01/Accounts/-----------------------/Messages.json -u ----------------------:-------------------- | python -m json.tool
# Send a text!
Nick$ curl -X POST https://api.twilio.com/2010-04-01/Accounts/-------------------/Messages.json -u ----------------------------:----------------------------- --data-urlencode 'From=+12062072038' --data-urlencode 'To=+12067084245' --data-urlencode 'Body=Hello from API class' | python -m json.tool
"""
print(message.sid)