About bitrix24-im
A reference skill for server-side Bitrix24 messenger development on on-premise portals. It covers messages, chats, notifications, bots, and implementation constraints for user checks and background work.
Key features
- 01Sending messages and managing chats
- 02Notification types, tags, and deletion
- 03Chat bots, slash commands, and open lines
- 04User identity and send-rights checks
- 05Background processing after sending
Use cases
- 01Implementing chat messages and membership changes
- 02Creating deduplicated, removable notifications
- 03Building module-based chat bots and commands
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ bxmaximum/ bitrix-framework-skills --skill bitrix24-imAfter installing, type/bitrix24-imin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
rules/bots.mdmessages-chats.mdnotifications.mdpitfalls.mdDetails
From the project READMEBitrix24 messenger (server side)
Scope: Bitrix24 on-premise · Verified: im 26.900.0, imbot 26.400.0, main 26.800.0
| Task | Read |
|---|---|
| Send messages, system messages, attach/keyboard, create chats, members, im events | rules/messages-chats.md |
| Notifications: types, tags, delete, confirm buttons, user settings schema | rules/notifications.md |
Chat bots and slash commands from a module; REST imbot.v2; open lines | rules/bots.md |
| Breaking changes im 26.700–26.900, REST ↔ PHP mapping | rules/pitfalls.md |
Invariants
Loader::includeModule('im')before any messenger class (Bitrix\Im\V2\Chat,CIMChat,CIMNotify…).- Pass explicit user ids (
FROM_USER_ID,AUTHOR_ID,TO_USER_ID, context user). Agents and CLI have no$USER. Bitrix\Im\V2\Chat::sendMessage()does not check the author's rights: callcanDo(Action::Send)first, or useCIMChat::AddMessage(), which checks unlessSYSTEM/SKIP_USER_CHECKisY.- After-send work (push, counters,
OnAfterMessagesAdd, bots) runs as a background job after the response. In CLI scripts call$result->getPromise()?->wait(); theCIM*wrappers wait by default. - Notifications:
CIMNotify::Add()only.NotifyChat::sendMessage()is a stub in im 26.900. - Give every notification a
NOTIFY_TAG: it dedupes (same tag replaces the older one for the user) and allows deletion. - Custom chats bound to your entity:
ENTITY_TYPEin your own namespace +addUniqueChat(); never writeb_im_*tables.
Comments
Markdown supported