Browse SDKs · WASM
SDKsWASMEnterprise

Get groups for a conversation

Get all conversation group IDs associated with a selected conversation.

Copy

A conversation can belong to several conversation groups. Use getConversationGroupIDsByConversationID() to query all groups to which one conversation currently belongs.

const { data: conversationGroupIDs } =
  await openimsdk.getConversationGroupIDsByConversationID(conversationID);

conversationID is an OpenIM conversation ID, not a chat group ID.

Return result

After the Promise succeeds, data is a string[] in which each element is a conversationGroupID. The method does not return complete group objects. Call getConversationGroups() to retrieve the current group list when group details are required; see Get conversation groups for the complete query flow.

This query does not trigger a group event. See Conversation group overview for how to receive and handle later changes to conversation-group associations.