I can't add users to subsessions

All integrations were made following the Zoom Video SDK documentation.
I’m having some unsolved issues in the documentation.

When I try to add a user to a subsession, using the following code snippet:

export const assignUserToSubsession = async (subsessionClient, userId, subsessionId) => {
    if (!subsessionClient) return
    await subsessionClient.assignUserToSubsession(userId, subsessionId)
}

I have the following error in the console:

{
    "type": "INVALID_PARAMETERS",
    "reason": ""
}

The subsessionClient, userId and subsessionId parameters, respectively, are being populated like this:
e {Symbol(breakout-room): HM} (object)
16778240 (int)
{D14F5472-BA9F-7AEC-3BD0-5DD3A05435B1} (string)

I primarily thought that the value returned in subsessionId could not have the characters “{” and “}”, so I tried to send it without those characters as well, but the error still remained.

Below is more information about the versions and system I am using:
Video SDK version: 1.12.5
React version: 18
Next JS version: 14.2.2
OS: Windows 11
Browser: Google Chrome
Browser Version 129.0.6668.70 (Official Build) (64 bits)

Hey @dev_lxpead

Thanks for your feedback.

From the information you provided, it seems you are trying to assign the host to a subsession.

If that’s the case, this is unnecessary and not allowed, because as the host, you can enter any subsession using the subsessionClient.joinSubsession method instead of being assigned to a subsession via the subsessionClient.assignUserToSubsession method.

Thanks
Vic

Hello @vic.yang !
Thanks for your feedback, I ran a test by passing the userId of a room participant who is not the host, and the error I got was different:

{
    "type": "OPERATION_TIMEOUT"
}

Analyzing the network tab in the browser’s developer tools, I came across this response from Zoom:

{
    "messages": "{\"time\":\"2024-10-22 19:52:59.955\",\"logLevel\":\"error\",\"message\":\"assignUserToRoom,params:[16783360,\\\"{D441DDDD-E5EE-5BE5-2759-D6A3BA06DC9C}\\\"],return failed,,type:OPERATION_TIMEOUT,\",\"tags\":[\"VideoSDK\",\"qr5fpHkxSUu31RVJ9L8f9Q==\",\"Breakout Room exception flow\",\"{E}nQCX_TAZThuiq0LqpJVcXQ{/E}\"],\"trackingId\":\"qr5fpHkxSUu31RVJ9L8f9Q==\",\"laplaceSessionId\":\"587b5e09-1604-44ac-b455-4e4d0c618336\"}",
    "meta": {
        "version": "000001",
        "flag": "0"
    }
}

Hey @dev_lxpead

Thanks for sharing more info with us.

From the log, it seems that subsessionClient.assignUserToSubsession was called before subsessionClient.openSubsessions.

Our documentation may not have been clear enough—assignUserToSubsession is only effective after the subsessions are opened. Before that, you can freely assign users to subsessions, and when calling openSubsessions, simply specify the confirmed subsession and the user list.

Thanks
Vic

Hello! @vic.yang
I managed to insert the participant into the subsession after running the openSubsessions function, thank you very much for your help!