وب‌هوک‌ها

اعلان‌های رویداد بلادرنگ

Webhooks allow you to receive real-time notifications when events occur in your bots. Instead of polling our API, we'll send events directly to your server as they happen.

ویژگی‌ها

Real-time

رویدادها را فوراً هنگام وقوع دریافت کنید

Secure

تأیید امضا برای اصالت

Reliable

تلاش مجدد خودکار با تأخیر نمایی

Flexible

اشتراک در رویدادهای خاص مورد نیاز

راه‌اندازی وب‌هوک‌ها

1

Create endpoint

Set up an HTTPS endpoint on your server to receive events

2

Configure in dashboard

Add your webhook URL in Settings → Integrations → Webhooks

3

Select events

Choose which events you want to receive

4

Save and test

Save the webhook and send a test event

رویدادهای موجود

message.received

پیام جدید در یک چت

message.edited

پیام ویرایش شد

member.joined

کاربر به یک گروه پیوست

member.left

کاربر از یک گروه خارج شد

command.executed

دستور ربات اجرا شد

module.triggered

عمل ماژول فعال شد

نمونه بار داده

{
  "event": "message.received",
  "timestamp": "2024-01-15T10:30:00Z",
  "signature": "sha256=...",
  "data": {
    "messageId": "msg_abc123",
    "chatId": "-100123456789",
    "from": {
      "id": 123456789,
      "username": "johndoe",
      "firstName": "John"
    },
    "text": "Hello, bot!",
    "date": "2024-01-15T10:30:00Z"
  }
}

بعدی: یکپارچه‌سازی OpenAI

Learn how to integrate OpenAI for AI-powered bot responses.

بعدی: یکپارچه‌سازی OpenAI