C
Yükleniyor...
Yükleniyor...
WhatsApp, Instagram ve Telegram'ı Cortex chatbot'unuza bağlayın. Müşterileriniz hangi kanalı kullanıyorsa orada AI ile karşılansın.
4 adım
# Gereksinimler:
# - Meta Business Manager hesabı (business.facebook.com)
# - Doğrulanmış işletme
# - WhatsApp'a kayıtlı olmayan telefon numarası
# Meta Business Manager'da:
# 1. Ayarlar > WhatsApp Hesapları > Ekle
# 2. Sistem Kullanıcısı oluştur (Yönetici)
# 3. WhatsApp izni ekle
# 4. Kalıcı token oluştur (Expires: Never)Business Doğrulaması olmadan Production erişimi kısıtlıdır. Sandbox'ta 5 test numarası desteklenir.
curl -X POST https://duzenal.com/api/v1/integrations/whatsapp \
-H "X-API-Key: ctx_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"chatbot_id": "bot_abc123",
"phone_number_id": "YOUR_PHONE_NUMBER_ID",
"whatsapp_business_account_id": "YOUR_WABA_ID",
"access_token": "YOUR_PERMANENT_TOKEN",
"verify_token": "cortex_verify_secret_123"
}'
# Yanıt
{
"ok": true,
"integration_id": "int_whatsapp_xyz",
"webhook_url": "https://duzenal.com/api/v1/webhooks/whatsapp",
"verify_token": "cortex_verify_secret_123",
"status": "pending_verification"
}# Meta Business Manager > WhatsApp > Yapılandırma > Webhook:
#
# Callback URL:
# https://duzenal.com/api/v1/webhooks/whatsapp
#
# Doğrulama Token'ı:
# cortex_verify_secret_123 ← API'den gelen değer
#
# Abonelik alanları (hepsini işaretleyin):
# ✓ messages
# ✓ message_deliveries
# ✓ message_reads
# ✓ message_reactions
# Webhook doğrulandıktan sonra:
curl https://duzenal.com/api/v1/integrations/whatsapp/int_whatsapp_xyz \
-H "X-API-Key: ctx_your_key_here"
# → status: "active"# Test numaranızdan botun numarasına "merhaba" yazın
# AI chatbot 2-3 saniye içinde yanıt vermeli
# Debug — son 10 mesajı gör
curl https://duzenal.com/api/v1/integrations/whatsapp/int_whatsapp_xyz/messages \
-H "X-API-Key: ctx_your_key_here" \
-G --data-urlencode "limit=10"
# Manuel mesaj gönder (test)
curl -X POST https://duzenal.com/api/v1/integrations/whatsapp/int_whatsapp_xyz/send \
-H "X-API-Key: ctx_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"to": "+905551234567",
"type": "text",
"text": "Merhaba! Test mesajı."
}'WhatsApp Business entegrasyonu tamamlandı!
Artık müşterileriniz WhatsApp Business üzerinden chatbot'unuza mesaj gönderebilir. Admin panelden entegrasyon durumunu ve mesaj istatistiklerini takip edin.