1. Documents
  2. Messaging API

Joining groups and rooms

Bot accounts using the Messaging API can join groups and rooms in LINE. This page explains what groups and rooms are and how you can use them with the Messaging API.

A room is a LINE chat room with more than 2 LINE users. Users can freely add other users to the room.

A group is a LINE chat that is created by a LINE user. A group can be created with just one LINE user. The LINE user can specify the name of the group and can invite other users to join the group. To join the group, other users must accept the user’s invitation.

Available and unsupported functions on rooms and groups are shown below.

Available functions Receiving webhooks of joining a room/group
Receiving messages
Sending reply messages
Sending push messages
Unsupported functions Sending multicast messages

Joining a group or a room

With the “join group/room” function enabled, your bot automatically joins groups or rooms when invited. For groups, an operation request is sent to your bot server when invited. For rooms, an operation request is sent at the time of the first event (such as when a message is sent or a user is invited to the room) after your bot joins the room.

There can only be 1 bot in a room or group. If a bot is invited to a room or group which already has a bot, either both bots will leave the room/group or one of the bots will remain in the room/group.

Sending messages

For more information on sending messages, go to Push message or Reply message. Multicast messages cannot be sent to groups or rooms.

Note that messages are displayed to all participants in the room or group.

Leaving a group or a room

Your bot account can leave groups or rooms using the endpoints in Leave in the API reference.

Provide the user with a keyword which the user can type in the chat to make your bot account leave the chat room.