# I can't add users to subsessions

**URL:** <https://devforum.zoom.us/t/i-cant-add-users-to-subsessions/119119>\
**Category:** Video SDK\
**Tags:** video-sdk\
**Created:** [October 14, 2024, 9:04pm UTC](https://devforum.zoom.us/t/i-cant-add-users-to-subsessions/119119 "2024-10-14T21:04:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev\_lxpead](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dev_lxpead/32/63797_2.png) [@dev\_lxpead](https://devforum.zoom.us/u/dev_lxpead)\
**Post date:** [October 14, 2024, 9:04pm UTC](https://devforum.zoom.us/t/i-cant-add-users-to-subsessions/119119/1 "2024-10-14T21:04:00Z")

</div>

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:

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

```

I have the following error in the console:

```auto
{
    "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)

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [October 15, 2024, 3:08am UTC](https://devforum.zoom.us/t/i-cant-add-users-to-subsessions/119119/2 "2024-10-15T03:08:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dev\_lxpead](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dev_lxpead/32/63797_2.png) [@dev\_lxpead](https://devforum.zoom.us/u/dev_lxpead)\
**Post date:** [October 22, 2024, 8:03pm UTC](https://devforum.zoom.us/t/i-cant-add-users-to-subsessions/119119/3 "2024-10-22T20:03:18Z")

</div>

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:

```auto
{
    "type": "OPERATION_TIMEOUT"
}

```

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

```auto
{
    "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"
    }
}

```

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [October 23, 2024, 2:39am UTC](https://devforum.zoom.us/t/i-cant-add-users-to-subsessions/119119/4 "2024-10-23T02:39:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dev\_lxpead](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dev_lxpead/32/63797_2.png) [@dev\_lxpead](https://devforum.zoom.us/u/dev_lxpead)\
**Post date:** [October 23, 2024, 9:26pm UTC](https://devforum.zoom.us/t/i-cant-add-users-to-subsessions/119119/5 "2024-10-23T21:26:24Z")

</div>

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