Skip to content

addChatMember

Sahri Riza Umami edited this page Jun 6, 2018 · 3 revisions

Adds new member to chat.
Members can't be added to private or secret chats.
Member will not be added until chat state will be synchronized with the server.
Member will not be added if application is killed before it can send request to the server.

addChatMember(chat_id, user_id, forward_limit)
Field Type Description
chat_id int53 Chat identifier
user_id int32 Identifier of the user to add
forward_limit int32 Number of previous messages from chat to forward to new member, ignored for channel chats

Example

Add user 133780085 into chat 1234567890 and limit previous messages to received by this new member to 17.

addChatMember(1234567890, 133780085, 17)

Response:

{
  ["@type"] = "ok"
}

Frequently Asked Questions
The Functions

Clone this wiki locally