forked from avinashkranjan/Amazing-Python-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
27 lines (21 loc) · 792 Bytes
/
main.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
25
26
27
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client
# Create Virtual Twilio Number (Trail Account)
VIRTUAL_TWILIO_NUMBER = "your virtual twilio number"
# Verify Your Personal Phone Number with Twilio (Trail Account)
VERIFIED_NUMBER = "your own phone number verified with Twilio"
# Your Account Sid and Auth Token from twilio.com/console
TWILIO_SID = "YOUR TWILIO ACCOUNT SID"
TWILIO_AUTH_TOKEN = "YOUR TWILIO AUTH TOKEN"
# Create Client
client = Client(TWILIO_SID, TWILIO_AUTH_TOKEN)
# Send SMS
message = client.messages \
.create(
body='This is the ship that made the Kessel Run in fourteen parsecs?',
from_=VIRTUAL_TWILIO_NUMBER,
to=VERIFIED_NUMBER
)
# Get Response
print(message.sid)