Chat Participants: Overview of Methods

Group chats facilitate communication among multiple users simultaneously. Manage chat participants using the methods im.chat.user.* and additional methods im.dialog.users.list, im.chat.leave.

Quick navigation: all methods and events

Linking Chat Participants to Other Objects

User. To add participants to a chat, pass a list of their identifiers in the USERS parameter. To exclude a participant, specify their identifier in the USER_ID parameter. You can obtain a user's identifier using the user.get method.

Chat. Users are linked to the chat by the chat identifier CHAT_ID. You can obtain the chat identifier through the create chat method or the get chat identifier method.

Add Participants

The im.chat.user.add method adds users to the chat. By default, new users cannot see the chat history. You can configure a new participant's access to the history using the HIDE_HISTORY parameter.

Get List of Participants

The im.chat.user.list method retrieves a list of chat participant identifiers.

To get detailed information about each user, use the im.dialog.users.list method. It supports pagination for handling large lists. You can exclude system users from the list or include only specific types.

Exclude Participants

The im.chat.user.delete method removes participants from the chat. To leave the chat as the current user, use the im.chat.leave method.

Overview of Methods

Scope: im

Who can execute the method: any user

Method

Description

im.chat.user.add

Invite participants to the chat

im.chat.user.list

Get identifiers of chat participants

im.dialog.users.list

Get the list of participants

im.chat.user.delete

Exclude participants from the chat

im.chat.leave

Leave the chat as the current user