Updated on 2025-07-28 GMT+08:00

Creating a Meeting

CreateConf

API Description

This API is used to create an instant meeting.

Precautions

  1. By default, this API enables you to join a meeting as a host. During API calling, there is no need to add your information to the participant parameters.
  2. If other participants need to be invited, their information needs to be transferred. If other participants are not required to join the meeting, participant details and the number of participants can be empty.
  3. This API is an asynchronous API. The return value only indicates whether the API is successfully called. The actual service processing result is returned in the corresponding callback function.

Method Definition

1
HWM_SDK_AGENT_API hwmsdk::HwmErrCode CreateConf(HwmCreateConfInfo *createConfInfo, HwmConfAttendee *attendees, unsigned int count);

Callback Function

1
virtual void OnCreateConfResult(hwmsdk::HwmErrCode ret, const char* reason) {};

Parameter Description

Parameter

Mandatory

Type

Description

createConfInfo

Yes

HwmCreateConfInfo

Meeting details.

attendees

No

HwmConfAttendee

Participant details. If participants are not required, set this parameter to NULL.

count

No

unsigned int

Number of participants. If participants are not required, set this parameter to 0.

Table 1 HwmCreateConfInfo description

Parameter

Mandatory

Type

Description

subject

Yes

char[]

Definition

Meeting topic.

Constraints

N/A

Range

0 to 385 characters.

Default Value

N/A

mediaType

Yes

HwmConfMediaType

Definition

Meeting type.

Constraints

N/A

Default Value

HWM_AUDIO_AND_DATA: voice and data meeting.

needPassword

No

bool

Definition

Whether a meeting password is required.

Constraints

Valid only for meetings with a random ID.

Default Value

The password is not required.

isAutoRecord

No

bool

Definition

Whether to enable automatic meeting recording. If this function is enabled, the meeting will be automatically recorded even when meeting recording is disabled.

Constraints

Valid only for cloud recording, not for local recording on clients.

Default Value

Automatic meeting recording is disabled.

allowRecord

No

bool

Definition

Whether meeting recording is supported.

Constraints

Valid only for cloud recording, not for local recording on clients.

Default Value

Recording is not supported.

callInRestriction

No

HwmJoinConfPermissionType

Definition

Users who can join the meeting. By default, everyone is allowed.

Constraints

N/A

Default Value

RESTRICTION_CALL_IN_ALL: everyone.

vmrId

No

char[]

Definition

Unique cloud meeting room ID.

Constraints

To schedule a meeting with a random meeting ID, set this parameter to an empty string.

Range

0 to 128 characters.

Default Value

N/A

vmrConfIdType

No

HwmVmrConfIdType

Definition

ID type of the cloud meeting room.

Constraints

N/A

Default Value

HWM_VMR_CONF_ID_TYPE_FIXED: fixed.

guestPwd

No

char[]

Definition

Guest password.

Constraints

If this parameter is left blank, the server randomly generates a value. Valid only for meetings with a random ID.

Range

0 to 64 characters.

Default Value

N/A

isOpenWaitingRoom

No

bool

Definition

Waiting room status.

Constraints

Takes effect only after the waiting room function is enabled.

Default Value

The waiting room is not enabled.

duration

No

int

Definition

Meeting duration, in minutes.

Constraints

N/A

Range

15 minutes to 1,440 minutes.

Default Value

30 minutes.

concurrentParticipants

No

unsigned int

Definition

Maximum number of participants in the meeting.

Constraints

N/A

Range

  • 0: unlimited.
  • > 0

Default Value

N/A

customInfo

No

char[]

Definition

Custom extension information.

Constraints

N/A

Range

0 to 64 characters.

Default Value

N/A

confResType

No

HwmConfResType

Definition

Meeting resource type.

Constraints

N/A

Default Value

HWM_CONF_RESTYPE_DEFAULT: default.

defaultSummaryState

No

HwmSummaryState

Definition

Initial state of whether cloud recording contains minutes.

Constraints

Valid only when the enterprise supports smart meeting minutes (corpEnableSummary). For details, see Table 1.

Default Value

SUMMARY_STATE_CLOSE: Meeting minutes are disabled.

autoMuteMode

No

HwmAutoMuteType

Definition

Whether to automatically mute soft client guests when they join the meeting.

Constraints

N/A

Default Value

AUTO_MUTE_TYPE_DEFAULT: same as the default configuration.

hardTerminalAutoMuteMode

No

HwmAutoMuteType

Definition

Whether to automatically mute hard terminal guests when they join the meeting.

Constraints

N/A

Default Value

AUTO_MUTE_TYPE_DEFAULT: same as the default configuration.

forbiddenScreenShots

No

bool

Definition

Whether screenshot capture is forbidden.

Constraints

N/A

Default Value

Screenshot capture is allowed.

autoPublishSummary

No

bool

Definition

Whether to automatically release minutes (without manual review).

Constraints

N/A

Default Value

Minutes are not automatically released.

Table 2 Enumerated values of HwmConfMediaType

Enumerated Value

Description

HWM_AUDIO_AND_DATA

Voice and data meeting.

HWM_VIDEO_AND_DATA

Video and data meeting.

Table 3 Enumerated values of HwmJoinConfPermissionType

Enumerated Value

Description

RESTRICTION_CALL_IN_ALL

Everyone.

RESTRICTION_CALL_IN_COMPANY

Corporate users only.

RESTRICTION_CALL_IN_INVITED

Invited users only.

Table 4 HwmConfAttendee description

Parameter

Mandatory

Type

Description

name

Yes

char[]

Definition

Participant name.

Constraints

N/A

Range

0 to 256 characters.

Default Value

N/A

number

Yes

char[]

Definition

Number.

Constraints

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.

Range

0 to 128 characters.

Default Value

N/A

thirdUserId

Yes

char[]

Definition

Third-party user ID.

Constraints

For app ID authentication. Either this parameter or number must be set.

Range

0 to 128 characters.

Default Value

N/A

Table 5 Enumerated values of HwmVmrConfIdType

Enumerated Value

Description

HWM_VMR_CONF_ID_TYPE_FIXED

Fixed.

HWM_VMR_CONF_ID_TYPE_RANDOM

Random.

Table 6 Enumerated values of HwmConfResType

Enumerated Value

Description

HWM_CONF_RESTYPE_DEFAULT

Default.

HWM_CONF_RESTYPE_SHARE_VMR

Shared cloud meeting room.

Table 7 Enumerated values of HwmSummaryState

Enumerated Value

Description

SUMMARY_STATE_CLOSE

Disabled.

SUMMARY_STATE_OPEN

Enabled.

Table 8 Enumerated values of HwmAutoMuteType

Enumerated Value

Description

AUTO_MUTE_TYPE_DEFAULT

Default.

AUTO_MUTE_TYPE_MUTE

Mute.

AUTO_MUTE_TYPE_UNMUTE

Unmute.

Return Values

Table 9 Return values

Type

Description

HwmErrCode

If 0 is returned, the operation is successful. If other values are returned, the operation fails. For details about values returned upon failures, see Common Error Codes.

Sample Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**
* Create a meeting.
*/
int demoCreateConfWithAttendeeDlg::clickCreatConfWithAttendee()
{
    int ret;
    hwmsdkagent::HwmCreateConfInfo data;
    memset(&data, 0, sizeof(hwmsdkagent::HwmCreateConfInfo));
    
    // Set the meeting topic.
    strncpy_s(data.subject, GetMeetingSubjectStr().c_str(), HWM_MAX_SUBJECT_LEN);
    // Set the meeting type.
    data.mediaType = hwmsdkagent::HWM_VIDEO_AND_DATA
    // Set whether the guest password is required for the meeting.
    data.needPassword = true;
    // Set the meeting incoming call restriction.
    data.callInRestriction = hwmsdkagent::RESTRICTION_CALL_IN_ALL;
    // Configure vmrId. To create a meeting with a random ID, leave vmrId empty. Here, m_confIdTypeCombo indicates that a meeting with a random ID is preferentially created.
    // Therefore, vmrIdSelect > 0 indicates the personal meeting ID or a cloud meeting room ID is used.
    const auto vmrIdSelect = m_confIdTypeCombo.GetCurSel();
    if (vmrIdSelect > 0 && vmrIdSelect - 1 < vmrList.size())
    {
        strcpy_s(data.vmrId, HWM_MAX_VMR_CONF_ID_LEN, vmrList[vmrIdSelect - 1].vmrId);
    }
    
    // Set participants.
    // Obtain participant details based on site requirements.
    CString tempCString;
    m_attendeesEdit.GetWindowText(tempCString);
    string tempString = CTools::UNICODE2UTF(tempCString);
    vector<string> list = CTools::split(tempString, ';');
    vector<string> temp;
    int count = list.size();
    int realCount = 0;
    if (count > 0)
    {
        // Apply for the struct memory.
        hwmsdkagent::HwmConfAttendee* participants;
        participants = (hwmsdkagent::HwmConfAttendee*)malloc(sizeof(hwmsdkagent::HwmConfAttendee) * count);
        if (participants == NULL)
        {
            return -1;
        }
        memset(participants, 0, sizeof(hwmsdkagent::HwmConfAttendee)*count);
 
        hwmsdkagent::HwmConfAttendee* participantsTemp = participants;
        for (int i = 0; i < count; i++)
        {
            temp = CTools::split(list[i], '-');
            if (temp.size() == 2)
            {
                // Assign a value to name.
                strncpy_s(participantsTemp->name, (char *)temp[0].c_str(), HWM_MAX_DISPLAY_NAME_LEN);
                // Assign a value to number.
                strncpy_s(participantsTemp->number, (char *)temp[1].c_str(), HWM_MAX_NUMBER_LEN);
                // Increase the number of pointers by 1.
                realCount++;
                participantsTemp++;
            }
        }
        // Call the SDK API to create the meeting.
        ret = hwmsdkagent::CreateConf(&data, participants, realCount);
 
        // Release memory space.
        free(participants);
        participants = NULL;
    }
    else
    {
        // Create a meeting without specifying participants.
        ret = hwmsdkagent::CreateConf(&data, NULL, 0);
    }
    return ret;
}