Last active
December 4, 2021 20:40
-
-
Save FBosler/ff78b98973b9fc3d04b4af0d978df18b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from twilio.rest import Client | |
from dotenv import load_dotenv | |
load_dotenv() | |
def send_sms(msg: str, recipient: str = None) -> None: | |
client = Client(os.getenv("TWILIO_SID"), os.getenv("TWILIO_AUTH")) | |
client.messages.create( | |
body=msg, | |
from_=os.getenv("TWILIO_NUMBER"), | |
to=recipient, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment