Help Center/ Meeting/ Client SDK Reference/ Windows SDK/ Typical Scenarios/ Scenario 9: Joining a Meeting by Clicking a Link in an Email
Updated on 2023-03-23 GMT+08:00

Scenario 9: Joining a Meeting by Clicking a Link in an Email

Description

You can use a meeting link (for example, https://bmeeting.huaweicloud.com/#/j/981924330/e11ddec62ee760734fcf2ba55b79937eac2aa68677caf659) in the notification email to join a meeting. The link contains the meeting ID (981924330) and random code (e11ddec62ee760734fcf2ba55b79937eac2aa68677caf659).

You can call this API to join a meeting using the meeting ID and 48-digit value (random code) mapping to the password in the meeting link before or after logging in to Huawei Cloud Meeting.

Service Process

When using the SDK to join a meeting, call the JoinConfByRandom API, and implement the OnJoinConfByRandom, OnConfState, and OnConfInfo functions.

  1. Call the API.

    1. Create a HwmJoinConfByRandomInfo object.
    2. Call the JoinConfByRandom API to join the meeting. The data in the preceding step is used as input parameters.

  2. Implement the callback function.

    Implement the OnJoinConfByRandomResult function.

  3. Implement the notification function.

    Implement the OnConfState function.

  4. Implement the notification function.

    Implement the OnConfInfo function.

Sample Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
// Join a meeting using the meeting ID and random code.
int demoJoinConfByRandomDlg::clickJoinConfByRandom()
{
    // Enter the meeting ID and password mapping value. If you join the meeting using the random code, you can configure the display name.
    string meetingID = CTools::UNICODE2UTF(CString("988148352"));
    string accessCode = CTools::UNICODE2UTF(CString("c4f92bc34e685bbba6c23589741be0431997f30da5d6e47b"));
    string participantName = CTools::UNICODE2UTF(CString("Hangzhou site"));
 
    hwmsdkagent::HwmJoinConfByRandomInfo data;
    memset(&data, 0, sizeof(hwmsdkagent::HwmJoinConfByRandomInfo));
 
    strncpy_s(data.confId, meetingID.c_str(), HWM_MAX_CONF_ID_LEN);
    strncpy_s(data.random, accessCode.c_str(), HWM_MAX_RANDOM_LEN);
    strncpy_s(data.name, participantName.c_str(), HWM_MAX_DISPLAY_NAME_LEN);
    
    int ret = hwmsdkagent::JoinConfByRandom(&data);
    return ret;
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/**
* Callback of the meeting ID and random code for joining a meeting
*/
void demoCallbackProc::OnJoinConfByRandomResult(hwmsdk::HwmErrCode ret, const char* reason)
{
    CString codeStr;
    codeStr.Format(_T("%d"), ret);
    string msgStr = CTools::UTF82MultiByte(msg);
    CString tips = _T("OnJoinConfByRandomResult code:") + codeStr + _T(", msg:") + CString(msgStr.c_str());
    AfxMessageBox(tips);
}

The OnConfState and OnConfInfo event notification scenarios are the same as the meeting creation scenario. For details, see Scenario 6: Creating a Meeting.

The 48-digit value mapping to the password is a part of the character string carried in the link for sharing a meeting.

https://bmeeting.huaweicloud.com/#/j/987297025/227b2d708b7e5a24ce8de2159772239b1672c0a85ba70d85