Browse SDKs · React Native
SDKsReact NativeEnterprise

Get conversations in a group

Query a conversation group and its paginated conversations.

Copy

Call getConversationGroupInfoWithConversations() to get a conversation group and its paginated conversation list.

const result = await OpenIMSDK.getConversationGroupInfoWithConversations({
  conversationGroupID,
  pagination: {
    pageNumber: 1,
    showNumber: 20,
  },
});

Parameters

ParameterTypeRequiredDescription
conversationGroupIDstringYesConversation-group ID to query.
pagination.pageNumbernumberYesPage number, starting at 1.
pagination.showNumbernumberYesNumber of conversations per page.

Return result

The call returns an object with these fields:

FieldTypeDescription
groupConversationGroupCurrent group information.
conversationTotalnumberTotal number of conversations in the group.
conversationElemsConversationItem[]Conversation details for the current page.

Stop requesting pages after the number of loaded conversations reaches conversationTotal. See Retrieve the conversation list for conversation fields and Conversation group overview for group fields.