Subir archivos a "/"

This commit is contained in:
2026-06-02 16:47:58 +00:00
parent b345c353e1
commit 4626bce548
4 changed files with 178 additions and 0 deletions

20
send.py Normal file
View File

@@ -0,0 +1,20 @@
import os
from dotenv import load_dotenv
from twilio.rest import Client
load_dotenv()
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
from_whatsapp = os.environ["TWILIO_WHATSAPP_FROM"]
to_whatsapp = os.environ["MY_WHATSAPP_TO"]
client = Client(account_sid, auth_token)
message = client.messages.create(
from_=from_whatsapp,
to=to_whatsapp,
body="Hola mundo desde Python usando Twilio WhatsApp."
)
print("Mensaje enviado correctamente.")
print("SID:", message.sid)
print("Estado:", message.status)