Webhook'lar, bot'larinizda olaylar gerceklestiginde gercek zamanli bildirimler almanizi saglar. API'mizi sorgulamak yerine, bir webhook URL'si yapilandirin ve etkinlikleri aninda size gonderelim.
Mevcut Etkinlikler
message.receivedSohbette yeni mesaj
message.editedMesaj duzenlendi
member.joinedKullanici bir gruba katildi
member.leftKullanici bir gruptan ayrildi
bot.addedBot bir gruba eklendi
bot.removedBot bir gruptan cikarildi
command.executedBot komutu yurutuldu
module.triggeredBir modul eylemi tetiklendi
Endpoints
/api/webhooksTum yapilandirilmis webhook'lari listeleyin
/api/webhooksYeni bir webhook endpoint'i olusturun
/api/webhooks/:idWebhook yapilandirmasini guncelleyin
/api/webhooks/:idBir webhook'u silin
/api/webhooks/:id/testWebhook'unuza bir test etkinligi gonderin
Webhook Guvenligi
Imza Dogrulama
Tum webhook verileri dogrulama icin bir imza basligi icerir:
X-BotLaunch-Signature: sha256=abc123...Example Payload
{
"event": "message.received",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"messageId": "msg_abc123",
"chatId": "-100123456789",
"from": {
"id": 123456789,
"username": "johndoe"
},
"text": "Hello, bot!"
}
}Yeniden Deneme Politikasi
If your endpoint returns a non-2xx status, we'll retry up to 3 times with exponential backoff (10s, 30s, 90s). After 3 failures, the webhook is paused.
Daha Fazlasini Kesfedin
API entegrasyonunuz icin guvenlik en iyi uygulamalarini ogrenin.
Security Guide