Skip to content

Commit 5adf145

Browse files
authored
Create sent_sms.py
1 parent 1016ce2 commit 5adf145

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

sent_sms.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from twilio import TwilioRestException
2+
from twilio.rest import TwilioRestClient
3+
4+
account_sid = "AC51c63d4a83cee616ab70eaecf37f5c81" # Your Account SID from www.twilio.com/console
5+
auth_token = "af1a68c45673d4f12f494b0baeb83921" # Your Auth Token from www.twilio.com/console
6+
7+
client = TwilioRestClient(account_sid, auth_token)
8+
9+
try:
10+
message = client.messages.create(
11+
body="Goodnight My lover,from San Francisco",
12+
to="+8613173659509", # Replace with your phone number
13+
from_="+14154171983 ") # Replace with your Twilio number
14+
except TwilioRestException as e:
15+
print(e)

0 commit comments

Comments
 (0)