Skip to main content
Join a group to start sending and receiving messages in it. Public groups can be joined freely, password groups require the correct password, and private groups require an admin to add you (no direct join).

Join a Group

Use joinGroup() to join a group.
ParameterDescription
GUIDThe GUID of the group to join
groupType.public, .password, or .private
passwordRequired for password-protected groups
Once joined, you can send and receive messages in the group. CometChat tracks joined groups — you don’t need to rejoin each session. Check hasJoined on the Group object to verify membership. The method returns a Group object with hasJoined set to true.

Real-time Group Member Joined Events

Register a CometChatGroupDelegate to receive events when members join.
Always remove group listeners when they’re no longer needed (e.g., on view dismissal). Failing to remove listeners can cause memory leaks and duplicate event handling.

Missed Group Member Joined Events

When fetching message history, join events appear as Action messages with:
  • action"joined"
  • actionByUser who joined
  • actionForGroup that was joined

Next Steps

Leave a Group

Allow members to leave a group

Retrieve Group Members

Fetch the list of members in a group

Send Messages

Send messages to group conversations

Add Members

Programmatically add members to a group