Webhook'lar API

Gercek zamanli etkinlik bildirimleri alin

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.received

Sohbette yeni mesaj

message.edited

Mesaj duzenlendi

member.joined

Kullanici bir gruba katildi

member.left

Kullanici bir gruptan ayrildi

bot.added

Bot bir gruba eklendi

bot.removed

Bot bir gruptan cikarildi

command.executed

Bot komutu yurutuldu

module.triggered

Bir modul eylemi tetiklendi

Endpoints

GET
/api/webhooks

Tum yapilandirilmis webhook'lari listeleyin

botId
POST
/api/webhooks

Yeni bir webhook endpoint'i olusturun

urleventssecret
PATCH
/api/webhooks/:id

Webhook yapilandirmasini guncelleyin

urleventsstatus
DELETE
/api/webhooks/:id

Bir webhook'u silin

id
POST
/api/webhooks/:id/test

Webhook'unuza bir test etkinligi gonderin

id

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