diff options
author | Parker M <contact@pkrm.dev> | 2023-09-19 20:19:55 -0500 |
---|---|---|
committer | Parker M <contact@pkrm.dev> | 2023-09-19 20:19:55 -0500 |
commit | 9027b7da3332604dd1c7d4934f764ce1ccfecb54 (patch) | |
tree | 4798770968bfa157e99d080d7254a43dcc9c1f01 /app/create_message.py | |
parent | ffea8cc42abb9882d18fbab87e097264ff014c02 (diff) |
Add Twilio Support
Diffstat (limited to 'app/create_message.py')
-rw-r--r-- | app/create_message.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/create_message.py b/app/create_message.py index 56989e9..f51c867 100644 --- a/app/create_message.py +++ b/app/create_message.py @@ -1,4 +1,5 @@ import telnyx +from twilio.rest import Client from initialize_variables import * @@ -10,3 +11,11 @@ def create_message(number, message): to=number, text=message ) + + if sms_service == 'twilio': + client = Client(twilio_account_sid, twilio_auth_token) + client.messages.create( + body=message, + from_=api_number, + to=number + ) |