User Block USER

Choose a tool for developing with an AI agent:

  • use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
  • use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation

The USER block displays the user's card within the attachment: name, avatar, and a link for navigation — for example, the person responsible for a request or the author of a comment. Pass the block as an element of the attachment's BLOCKS array — general rules and limits are described on the Attachments in Messages ATTACH page.

Only the LINK field makes the block clickable. For a Bitrix24 employee, pass the profile path in LINK, for example /company/personal/user/1/. For an external contact, pass an absolute URL.

The block stores a single navigation target. If several fields are passed, only the first one in order of priority remains: NETWORK_ID, USER_ID, CHAT_ID, BOT_ID, LINK. As a result, LINK is discarded together with any ID, and the web client does not implement navigation by ID, so the block is not clickable.

User Block

Block Parameters

Name
type

Description

NAME*
string

The name displayed in the block

AVATAR
string

Avatar URL. Absolute URLs (http://, https://) and relative paths from the Bitrix24 root are allowed

LINK
string

URL for navigation when clicking on the block: an absolute http:// or https:// URL or a path from the Bitrix24 root. Ignored if any of the IDs below is passed

USER_ID
integer

Bitrix24 user ID. It is retained in the attachment, but the web client does not implement navigation by it

CHAT_ID
integer

Bitrix24 chat ID. It is retained in the attachment, but the web client does not implement navigation by it. Changes the avatar placeholder to CHAT

BOT_ID
integer

Bitrix24 chatbot ID. It is retained in the attachment, but the web client does not implement navigation by it. Changes the avatar placeholder to BOT

NETWORK_ID
string

Bitrix24 Network user ID: a letter followed by a number. Overrides all other navigation fields

AVATAR_TYPE
string

Type of placeholder displayed when AVATAR is not set: USER, CHAT, BOT. Defaults to USER, to CHAT with CHAT_ID, and to BOT with BOT_ID. An explicit value overrides the automatic one

Examples

How to Use Examples in Documentation

The examples show a single element of the BLOCKS array.

Bitrix24 Employee

Clicking the block opens the profile of the user with ID 1.

{
            USER: {
                NAME: 'John Smith',
                AVATAR: 'https://files.shelenkov.com/bitrix/images/avatar.png',
                LINK: '/company/personal/user/1/'
            }
        }
        
block = {
            "USER": {
                "NAME": "John Smith",
                "AVATAR": "https://files.shelenkov.com/bitrix/images/avatar.png",
                "LINK": "/company/personal/user/1/",
            },
        }
        
[
            'USER' => [
                'NAME' => 'John Smith',
                'AVATAR' => 'https://files.shelenkov.com/bitrix/images/avatar.png',
                'LINK' => '/company/personal/user/1/'
            ]
        ]
        

Clicking the block opens the external page from LINK.

{
            USER: {
                NAME: 'John Smith',
                AVATAR: 'https://files.shelenkov.com/bitrix/images/avatar.png',
                LINK: 'https://shelenkov.com'
            }
        }
        
block = {
            "USER": {
                "NAME": "Stefan Meier",
                "AVATAR": "https://files.shelenkov.com/bitrix/images/avatar.png",
                "LINK": "https://shelenkov.com",
            },
        }
        
[
            'USER' => [
                'NAME' => 'John Smith',
                'AVATAR' => 'https://files.shelenkov.com/bitrix/images/avatar.png',
                'LINK' => 'https://shelenkov.com'
            ]
        ]
        

Continue Learning