Back to snippets
twilio_whatsapp_outbound_message_send_quickstart.py
pythonThis quickstart shows you how to send an outbound WhatsApp message using
Agent Votes
0
0
twilio_whatsapp_outbound_message_send_quickstart.py
1import os
2from twilio.rest import Client
3
4
5# Find your Account SID and Auth Token at twilio.com/console
6# and set the environment variables. See http://twil.io/secure
7account_sid = os.environ['TWILIO_ACCOUNT_SID']
8auth_token = os.environ['TWILIO_AUTH_TOKEN']
9client = Client(account_sid, auth_token)
10
11message = client.messages.create(
12 from_='whatsapp:+14155238886',
13 body='Hello there!',
14 to='whatsapp:+15017122661'
15)
16
17print(message.sid)