Skip to main content

Callback Events

Bot message and group events are pushed to your server via the configured callback URL.

Callback URL

Callback events are sent to the callback_url configured in the Bot settings.

ItemDescription
MethodPOST
Content-Typeapplication/json

Message Events

Event Types

Event TypeDescription
message.addNew message
message.updateMessage edited
message.deleteMessage recalled/deleted

Callback Fields

FieldTypeDescription
event_typestringEvent type
message_typeintEvent action type
chat_typeintConversation type (one-on-one/group)
chat_idstringConversation ID
thread_idstring/uint64Thread ID
idstringMessage ID
sender_idstringSender ID
message_type_idintMessage type ID
contentstringNormalized message content JSON

Group Events

Event Types

Event TypeDescription
group.member.addNew member joined the group
group.member.removeMember left or was removed from the group
group.updateGroup info updated

Callback Fields

FieldTypeDescription
event_typestringEvent type
chat_typeintConversation type
chat_idstringConversation ID
contentobjectOriginal group event content

Callback Delivery Restrictions

Callbacks may not be delivered under the following conditions:

  1. Bot does not have callback_url configured
  2. Bot has been banned
  3. Group-level permission chat_bot_permission does not allow the current event
  4. Command/message does not match the required permission bits

Command Match Example

{
"chat_id": "7602566729281049630",
"sender_id": "7569434771739130881",
"command": "/start",
"content": "<p><at userid=\"7569434771739130881\">test bot</at> test webhook</p>"
}