blob: f51c8673319b99f7593bb3395ef91c7291172b20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import telnyx
from twilio.rest import Client
from initialize_variables import *
def create_message(number, message):
if sms_service == 'telnyx':
telnyx.api_key = telnyx_api_key
telnyx.Message.create(
from_=api_number,
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
)
|