# How to set custom userId?

**URL:** <https://devforum.zoom.us/t/how-to-set-custom-userid/59242>\
**Category:** Web\
**Created:** [October 22, 2021, 10:37am UTC](https://devforum.zoom.us/t/how-to-set-custom-userid/59242 "2021-10-22T10:37:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wuxyman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/wuxyman/32/31886_2.png) [@wuxyman](https://devforum.zoom.us/u/wuxyman)\
**Post date:** [October 22, 2021, 10:37am UTC](https://devforum.zoom.us/t/how-to-set-custom-userid/59242/1 "2021-10-22T10:37:02Z")

</div>

**Description**  
last parameter of generateVideoToken should be custom userId, i think.  
but getCurrentUserInfo or getSessionInfo return a not sure userId.

**Browser Console Error**  
nothing

**Which Web Video SDK version?**  
1.1.5

**Video SDK Code Snippets**

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Go to ‘…’
2. Click on ‘…’
3. Scroll down to ‘…’
4. See error

**Screenshots**  
If applicable, add screenshots to help explain your problem.

**Device (please complete the following information):**

- Device: Macbook Pro
- OS: macOS Big Sur
- Browser: Chrome
- Browser Version :95.0.4638.54（Official Build） (x86\_64)

**Additional context**  
I have many canvas dom,so i want a predictable userID to find corresponding dom.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 29, 2021, 9:42pm UTC](https://devforum.zoom.us/t/how-to-set-custom-userid/59242/2 "2021-10-29T21:42:37Z")

</div>

Hey @wuxyman ,

> [@wuxyman](#):
>
> last parameter of generateVideoToken should be custom userId, i think.

That is correct: [https://marketplace.zoom.us/docs/sdk/video/web/essential/create-join-session#authenticate](https://marketplace.zoom.us/docs/sdk/video/web/essential/create-join-session#authenticate)

This allows you to pass in a custom id for your own reporting purposes. This ID will be present in the new Video SDK [APIs](https://marketplace.zoom.us/docs/api-reference/zoom-video-sdk-api/sessions/sessionusers) and [Webhooks](https://marketplace.zoom.us/docs/api-reference/webhook-reference/video-sdk-events/session-user-joined).

> [@wuxyman](#):
>
> but getCurrentUserInfo or getSessionInfo return a not sure userId.

Correct. There is also a in session userId that Zoom generates that identifies the user so the developer can call the other Video SDK in session APIs for that user.

Example, the `stream.muteAudio(userId?: number)` function.

> **[Stream | Zoom Video SDK for Web - 1.6.0](https://marketplacefront.zoom.us/sdk/custom/web/modules/stream.html#muteaudio)**
>
> Documentation for Zoom Video SDK for Web - 1.6.0

The one in the signature is for the Video SDK APIs and Webhooks, the one that Zoom generates for the live session is for the in session functions. 🙂

Does that make sense?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [November 29, 2021, 7:43am UTC](https://devforum.zoom.us/t/how-to-set-custom-userid/59242/3 "2021-11-29T07:43:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
