Skip to main content

snippets_py

Integration

New integration from credential
twilio = yepcode.integration.twilio('credential-slug')
New integration from plain authentication data
from twilio.rest import Client
twilio = Client('your-account-SID', 'your-auth-token')

Send SMS Message

Send SMS message
message = twilio.messages.create(
body='SMS content',
from='Your twilio phone number in international format',
to='Destination phone number in international format'
)

print(message.sid)

Send Whatsapp Message

Send Whatsapp message
message = twilio.messages.create(
body='Whatsapp content',
from='whatsapp:Your twilio phone number in international format',
to='Destination phone number in international format'
)

print(message.sid)