SMS (Twilio)
Ringkasan
Section titled “Ringkasan”Provider event Twilio memungkinkan pengiriman pesan SMS melalui API Twilio.
Konfigurasi
Section titled “Konfigurasi”{ "events-sms-twilio": { "enabled": true, "account_sid": "ACxxx...", "auth_token": "xxx...", "from_number": "+1234567890" }}Opsi Konfigurasi
Section titled “Opsi Konfigurasi”| Opsi | Wajib | Deskripsi |
|---|---|---|
enabled | Ya | Aktifkan/nonaktifkan provider |
account_sid | Ya | Account SID Twilio |
auth_token | Ya | Auth Token Twilio |
from_number | Ya | Nomor telepon pengirim (format E.164) |
Mengirim SMS
Section titled “Mengirim SMS”SMS Dasar
Section titled “SMS Dasar”- id: send_sms type: event config: provider: events-sms-twilio action: send to: "+1987654321" body: "Your verification code is: {{code}}"Di Flow
Section titled “Di Flow”name: send_notificationversion: "1.0"
nodes: - id: send_alert type: event config: provider: events-sms-twilio action: send to: "{{user_phone}}" body: "Alert: {{alert_message}}"
triggers: - type: event event_type: "alert.critical" target: send_alertMenerima SMS
Section titled “Menerima SMS”Konfigurasikan webhook Twilio untuk menerima SMS masuk:
triggers: - type: event event_type: "twilio.sms.incoming" target: handle_sms