Browse SDKs · WASM
SDKsWASMEnterprise

Start a group call

Start a group audio or video call with the WASM SDK.

Copy

signalingInviteInGroup() starts a group call. It invites only the group members explicitly listed in inviteeUserIDList; setting groupID does not automatically invite the entire group.

Parameters

ParameterTypeRequiredDescription
invitationRtcInviteYesInvitation for this call.
invitation.inviterUserIDstringYesUser ID of the caller.
invitation.inviteeUserIDListstring[]YesIDs of the invited group members. Do not include the caller.
invitation.groupIDstringYesGroup ID. It cannot be empty for a group call.
invitation.roomIDstringYesUnique room identifier for this call. Every participating client must use the same value.
invitation.timeoutnumberYesInvitation timeout in seconds.
invitation.mediaTypestringYesApplication-defined media type, usually audio or video.
invitation.sessionTypeSessionTypeYesUse SessionType.WorkingGroup for a group call.
invitation.platformIDPlatformYesCaller's platform. Use Platform.Web in a web application.
invitation.customDatastringNoBusiness extension string carried with the invitation.
invitation.initiateTimenumberNoInvitation start time. The signaling flow normally maintains it, so it does not need to be set manually.
invitation.busyLineUserIDListstring[]NoBusy-user list. Normally omit it when starting a new invitation.
offlinePushInfoOfflinePushNoPush content used when an invitee is offline.
offlinePushInfo.titlestringConditionalPush title, required when offlinePushInfo is provided.
offlinePushInfo.descstringConditionalPush body, required when offlinePushInfo is provided.
offlinePushInfo.exstringConditionalExtension string, required when offlinePushInfo is provided. Pass an empty string if unused.
offlinePushInfo.iOSPushSoundstringConditionaliOS push sound, required when offlinePushInfo is provided.
offlinePushInfo.iOSBadgeCountbooleanConditionalWhether to update the iOS badge, required when offlinePushInfo is provided.
import { Platform, SessionType } from '@openim/wasm-client-sdk';

const { data: roomCredentials } = await openimsdk.signalingInviteInGroup({
  invitation: {
    inviterUserID: currentUserID,
    inviteeUserIDList: selectedGroupMemberIDs,
    customData: JSON.stringify({ source: 'group-call' }),
    groupID,
    roomID: groupID,
    timeout: 30,
    mediaType: 'video',
    sessionType: SessionType.WorkingGroup,
    platformID: Platform.Web,
  },
  offlinePushInfo,
});

The example reuses the group ID as the room ID. If your application generates its own roomID, every participant must use the same value. Remove the current user, empty values, and duplicates from the invitee list before starting the call.

When the Promise resolves, data is RtcInviteResults. For field descriptions, see Start a one-to-one call.

busyLineUserIDList indicates only that some members are busy and should not stop invitations to the others. Promise completion also does not mean that any invitee has answered.