Browse SDKs · uni-app / uni-app x
Platform
SDKsuni-app / uni-app xEnterprise

Get room by group ID

Query the active calling room information for a specific group.

Copy

Query active calling room details for a given group using its groupID.

Parameters

ParameterTypeRequiredDescription
groupIDstringYesThe target group identifier.

Code example

import {
  signalingGetRoomByGroupID,
} from '@/uni_modules/unix-openim-sdk'

const result = await signalingGetRoomByGroupID({ groupID })

if (result?.roomID != null) {
  restoreGroupCall(result.roomID!, result.invitation)
} else {
  clearStaleGroupCall(groupID)
}

Return value

The Promise resolves with an OpenIMSignalingGetRoomByGroupIDResult | null object:

PropertyTypeDescription
roomIDstring | nullThe active group call room identifier.
invitationOpenIMSignalingInvitationInfo | nullThe invitation payload associated with the active room.

If the result is null or does not contain a valid roomID, no call is currently active in that group; clean up any cached group call UI accordingly. A rejected Promise indicates a query error; do not mistake network timeouts or authentication errors for an absent call unless the server specifically reports that no room exists.

State changes after the call

This is a read-only query that retrieves point-in-time room metadata without altering server-side state or triggering events. For real-time updates on active calls, see Handle call events.