Skip to content

Instantly share code, notes, and snippets.

@FBosler
Last active December 4, 2021 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FBosler/ff78b98973b9fc3d04b4af0d978df18b to your computer and use it in GitHub Desktop.
Save FBosler/ff78b98973b9fc3d04b4af0d978df18b to your computer and use it in GitHub Desktop.
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