Start a group call
Invite specified group members to join an audio or video group call.
Invoke signalingInviteInGroup() to invite specific group members to an audio or video call. This API delivers invitations strictly to the members listed in inviteeUserIDList; specifying groupID does not automatically invite all members of the group.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
invitation | OpenIMSignalingInvitationInfo | Yes | The signaling invitation configuration object. |
invitation.inviterUserID | string | Recommended | The user ID of the caller initiating the invitation. |
invitation.inviteeUserIDList | string[] | Yes | An array of user IDs of the group members being invited. |
invitation.groupID | string | Yes | The target group identifier. |
invitation.roomID | string | Yes | A unique room identifier generated for this group call session. |
invitation.timeout | number | Yes | Ringing timeout duration in seconds. |
invitation.mediaType | string | Yes | Media type agreed upon by your application, such as 'audio' or 'video'. |
invitation.sessionType | OpenIMSessionType | Yes | Use the session type matching the group conversation (typically OpenIMSessionTypeWriteGroup for working groups). |
invitation.platformID | OpenIMPlatform | Recommended | Current platform constant matching the one used during initSDK(). |
invitation.customData | string | No | Optional business payload string attached to the invitation. |
offlinePushInfo | OpenIMSignalingOfflinePushInfo | No | Push notification configuration for offline group members. |
Keep these group-specific guidelines in mind:
- Pass the valid
groupIDof an active group. - Filter
inviteeUserIDListto exclude the inviter's own user ID, empty values, and duplicate entries. - Generate a new, unique
roomIDfor every call session rather than reusinggroupID.
Code example
import {
OpenIMSessionTypeWriteGroup,
signalingInviteInGroup,
} from '@/uni_modules/unix-openim-sdk'
const invitation = {
inviterUserID: currentUserID,
inviteeUserIDList: selectedGroupMemberIDs,
customData: JSON.stringify({ source: 'group-call' }),
groupID,
roomID: createCallRoomID(),
timeout: 30,
mediaType: 'video',
sessionType: OpenIMSessionTypeWriteGroup,
platformID: currentOpenIMPlatform,
}
const result = await signalingInviteInGroup({
invitation,
offlinePushInfo,
})Return value
The Promise resolves with an OpenIMSignalingInviteResult | null object containing room credentials and busyLineUserIDList. Users listed in busyLineUserIDList were busy on other calls; this does not invalidate invitations sent to other available group members.
State changes after the call
A resolved Promise confirms that invitation requests were dispatched to OpenIMServer and that room credentials were created. It does not indicate that any group member has accepted. Merge call session state by roomID, and track individual member statuses by combining roomID with each member's userID. For ongoing participation updates, see Handle call events.
Was this page helpful?