Browse SDKs · React Native
SDKsReact NativeEnterprise

Create a conversation group

Create a conversation group for the current account.

Copy

Call createConversationGroup() to create a conversation group for the current account. A normal group requires at least name; you can also add a conversation when creating it.

const group = await OpenIMSDK.createConversationGroup({
  name: 'Work',
  order: 100,
  conversationID,
  conversationGroupType: ConversationGroupType.ConversationGroupTypeNormal,
});

Parameters

ParameterTypeRequiredDescription
namestringYesGroup name.
ordernumberNoGroup sort value.
exstringNoGroup extension string.
conversationIDstringNoConversation ID to add immediately after creation.
conversationGroupTypeConversationGroupTypeNoGroup type. Use ConversationGroupTypeNormal for a normal custom group.

Return result

The call returns the new ConversationGroupResp, including fields such as conversationGroupID, name, order, and conversationIDs. Group creation is delivered through OnConversationGroupAdded; see Conversation group overview.