Updated on 2024-07-30 GMT+08:00

Adding Participants

Function

This API is used to add participants to a meeting or call. 1. If you are not in the meeting or call, calling this API will fail. 2. If you call this API during a call, the call is converted to a meeting.

Function Prototype

addAttendee(addAttendeeInfo: AddAttendeeInfo, onAddAttendeeResult?: (ret: SDKERR, reason: string) => void): voidaddAttendee(addAttendeeInfo: AddAttendeeInfo, onAddAttendeeResult?: (ret: SDKERR, reason: string) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
addAttendeeInfo Yes AddAttendeeInfo Information about participants to be added.
onAddAttendeeResult Yes (ret: SDKERR, reason: string) => void Callback of adding participants.
Table 2 AddAttendeeInfo
Parameter Mandatory Type Description
attendeeSize Yes number Number of participants to be added.
attendees Yes AttendeeBaseInfo List of participants to be added.
Table 3 AttendeeBaseInfo
Parameter Mandatory Type Description
nickName Yes string Participant name.
number Yes string Number. If this parameter is set to the SIP number (for example, +99111244216210249) allocated to the account, the Huawei Cloud Meeting app is called. If this parameter is set to a PSTN number (for example, 18700000000), the number is called through the VoIP gateway if the enterprise has enabled PSTN call. This parameter is used for account and password authentication. Either this parameter or thirdUserId must be set.
thirdUserId Yes string Third-party user ID. This parameter is used for app ID authentication. Either this parameter or number must be set.
accountId No string Huawei Cloud Meeting account.
email No string Email address used for receiving email notifications.
sms No string Mobile number used for receiving SMS notifications.
isAutoInvite No boolean Whether to automatically invite participants.
isMute No boolean Whether to mute the microphone.
role No ConfRole Participant role in the meeting.
type No AttendeeType Participant type.
userUuid No string Participant UUID.
Table 4 Enumerated values of ConfRole
Enumeration Name Enumerated Value Description
HWM_CONF_ROLE_ATTENDEE 0 Common participant.
HWM_CONF_ROLE_HOST 1 Host.
HWM_CONF_ROLE_AUDIENCE 2 Attendee.
HWM_CONF_ROLE_COHOST 3 Co-host.
HWM_CONF_ROLE_WAITING 4 Waiting room member.
Table 5 Enumerated values of AttendeeType
Enumeration Name Enumerated Value Description
ATTENDEE_TYPE_NORMAL 0 Voice, HD, and SD participant addresses.
ATTENDEE_TYPE_TELEPRESENCE 1 Address of a telepresence participant (uni-screen or tri-screen telepresence participant).
ATTENDEE_TYPE_TERMINAL 2 Meeting room or hard terminal.
ATTENDEE_TYPE_OUTSIDE 3 External participant.
ATTENDEE_TYPE_CUSTOMNUMBER 4 Custom number.
ATTENDEE_TYPE_MOBILE 5 Soft client user's mobile phone.
ATTENDEE_TYPE_ANONYMOUS 6 Anonymous user.
ATTENDEE_TYPE_TELEPHONE 7 Phone user.
ATTENDEE_TYPE_BOARD 8 Whiteboard user.
ATTENDEE_TYPE_IDEAHUB 9 Large-screen device with HiSilicon chips.
ATTENDEE_TYPE_HWVISION 10 Smart TV.
ATTENDEE_TYPE_WELINKC 11 WeLink (public edition).

Return Values

void

Callback Method Parameters

(ret: SDKERR, reason: string) => void

Table 6 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.