ActiveXperts Knowledge Base Article 7540032

Our mission at ActiveXperts Software is to deliver high quality Network Monitoring solutions and Windows Development components. Our goal is to supplement these solutions with timely support resources that can help at many different levels.
The first thing you want to do is try to find the answer to your problem in the Knowledge Base. If you cannot find an answer to your question in our Knowledge Base, or if you need additional information or assistance, please use our Contact Support form.


Q7540032 - I'm using Twilio for Whatsapp alerts, but I'm experiencing some difficulties with the setup. Do you have a standalone Python script that I can use to test it outside ActiveXperts Software?

Here is a Python script:

# requires: pip install twilio
from twilio.rest import Client

# Twilio authentication properties (assigned to your Twilio account).
ACCOUNT_SID = "ACb12b4b9c8f3456abf46aa2cd2edda678"
AUTH_TOKEN = "d512e340c567e1b8a08300b4a71e2bb8"

# Twilio sender phone number (assigned to your Twilio account).
FROM_NUMBER = "whatsapp:+11234567890"

# Recipient
TO_NUMBER = "whatsapp:+31612345678"

# Send the message
client = Client(ACCOUNT_SID, AUTH_TOKEN)
message = client.messages.create(
  body="Hello sir/madam, this is a test Whatsapp sent from Python using Twilio.",
  from_=FROM_NUMBER,
  to=TO_NUMBER
)

print( f"Whatsapp sent. SID = {message.sid}" )

If you cannot find an answer to your question(s) in our Knowledge Base, or if you need additional information or assistance, please contact our Customer Support using our Contact Support Form

M