⚙️   Pengaturan
19:29:30
A
Admin

🔗 Webhook Endpoints

Daftarkan URL-URL ini di platform masing-masing untuk menerima pesan masuk secara otomatis.

TikTok Comment & Mention Webhook
POST  /api/webhook/tiktok/comment
Daftarkan di TikTok Developer Portal → Apps → Event Subscriptions → pilih event comment.created. Isi Callback URL dengan https://yourdomain.com/api/webhook/tiktok/comment
ManyChat WhatsApp Inbound (via ManyChat Flow)
POST  /api/webhook/manychat/inbound
Di ManyChat: buat Flow → tambahkan Action "External Request" → Method POST → URL: https://yourdomain.com/api/webhook/manychat/inbound
Body (JSON): { "phone": "{{user phone}}", "fullName": "{{full name}}", "lastInputText": "{{last input text}}", "subscriberId": "{{subscriber id}}" }

🤖 Konfigurasi ManyChat API

Edit di appsettings.json atau set sebagai environment variable.

ManyChat:ApiToken
507644••••••••
ManyChat:PageId
5076445
Cara mendapatkan API Token ManyChat
  1. Login ke app.manychat.com
  2. Buka Settings → API
  3. Klik "Generate Access Token"
  4. Salin token ke appsettings.jsonManyChat:ApiToken

🗄️ Database MySQL

Connection string di ConnectionStrings:DefaultConnection

Connection String (masked)
Server=localhost;Port=3306;User ID=aspirasi_user;password=••••;Database=aspirasi_subangaspirasi
Perintah EF Core Migration
dotnet ef migrations add InitialCreate
dotnet ef database update

📊 Arsitektur Alur Data

Alur TikTok → Sistem → WhatsApp
🎵 TikTok
Comment/Mention
⚡ Webhook
POST /tiktok/comment
🗄️ MySQL
IncomingMessages
🤖 ManyChat
Send Content API
Alur WhatsApp → Sistem → Notif Subscriber
🤖 ManyChat
Flow Trigger
⚡ Webhook
POST /manychat/inbound
🗄️ MySQL
Simpan + Auto-Forward
📲 WA Subscribers
via ManyChat API