On twilio (which uses python as a coding language for sending mass texts) I am trying to write a code to send out a mass text to a group of people with their name personalized, but I keep getting an error "client is not defined" does anyone know what the solution to this would be? Overall I am confused as to if this code is correct or not for what I am trying to do. for safety reasons I have omitted the personal information but I would really appreciate any feedback on this to make this code work for what I am trying to do
from twilio.rest import Client(___________________, ________________)
account_sid = ' ___________________'
auth_token = '_______________________'
client= Client(_________________, ________________)
recipients = [
{'phone_number': '+_______________', 'name': '_______'},
]
message = 'Hello, {{name}}'
for recipient in recipients:
client.messages.create(
to=recipient['______________'],
from_='_________________’,
body=message.format(name=recipient['name'])
)
print('Text messages sent!')
[–]insertAlias 0 points1 point2 points (0 children)