# Why user id is dynamically allocated? And How can I get my own user id?

**URL:** <https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916>\
**Category:** Windows\
**Created:** [January 26, 2018, 3:45am UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916 "2018-01-26T03:45:28Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![xueliang\_qin](https://avatars.discourse-cdn.com/v4/letter/x/50afbb/32.png) [@xueliang\_qin](https://devforum.zoom.us/u/xueliang_qin)\
**Post date:** [January 26, 2018, 3:45am UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916/1 "2018-01-26T03:45:28Z")

</div>

Each time I start or join a meeting, it seems the user id is always different. And I don’t know how to get my own user id when in meeting.

---

<div class="post-metadata">

**Author:** ![dats\_liao](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dats_liao/32/464_2.png) [@dats\_liao](https://devforum.zoom.us/u/dats_liao)\
**Post date:** [January 26, 2018, 3:57am UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916/2 "2018-01-26T03:57:56Z")

</div>

hi,

this user id is the meeting level, in-meeting user id. not the user id of your account. about account user id, you can get this by our REST API.&nbsp;

thanks.&nbsp;

---

<div class="post-metadata">

**Author:** ![xueliang\_qin](https://avatars.discourse-cdn.com/v4/letter/x/50afbb/32.png) [@xueliang\_qin](https://devforum.zoom.us/u/xueliang_qin)\
**Post date:** [January 26, 2018, 5:39am UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916/3 "2018-01-26T05:39:56Z")

</div>

Thanks for your clarification, Dats. I’m talking about how to get the IN-MEETING user id. Because I didn’t see any method or callback provide this functionality. Thanks.

---

<div class="post-metadata">

**Author:** ![xueliang\_qin](https://avatars.discourse-cdn.com/v4/letter/x/50afbb/32.png) [@xueliang\_qin](https://devforum.zoom.us/u/xueliang_qin)\
**Post date:** [January 26, 2018, 5:55am UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916/4 "2018-01-26T05:55:39Z")

</div>

I find the&nbsp;GetUserByUserID(unsigned int userid) can get current user id.

 ![](https://support.zoom.us/hc/user_images/QsKUwfd4QDnIklesTJU1dg.png)But what’s the right timing to call this method?

---

<div class="post-metadata">

**Author:** ![xueliang\_qin](https://avatars.discourse-cdn.com/v4/letter/x/50afbb/32.png) [@xueliang\_qin](https://devforum.zoom.us/u/xueliang_qin)\
**Post date:** [January 26, 2018, 6:02am UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916/5 "2018-01-26T06:02:50Z")

</div>

when the meeting status is&nbsp;MEETING\_STATUS\_INMEETING?

---

<div class="post-metadata">

**Author:** ![dats\_liao](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dats_liao/32/464_2.png) [@dats\_liao](https://devforum.zoom.us/u/dats_liao)\
**Post date:** [January 26, 2018, 7:02am UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916/6 "2018-01-26T07:02:05Z")

</div>

hi,&nbsp;

please handle the&nbsp;ZOOM\_SDK\_NAMESPACE.IMeetingParticipantsCtrlEvent.onUserJoin&nbsp; and&nbsp;ZOOM\_SDK\_NAMESPACE.IMeetingParticipantsCtrlEvent.onUserLeft&nbsp; callback event.

thanks.

-dats.

---

<div class="post-metadata">

**Author:** ![xueliang\_qin](https://avatars.discourse-cdn.com/v4/letter/x/50afbb/32.png) [@xueliang\_qin](https://devforum.zoom.us/u/xueliang_qin)\
**Post date:** [January 26, 2018, 8:38am UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916/7 "2018-01-26T08:38:01Z")

</div>

Hi Dats, I’m just going to talk about these two callbacks, onUserJoin&nbsp; and&nbsp;onUserLeft, which doesn’t work. But I did register them before join/start meeting. What’s more, onUserAudioStatusChange callback doesn’t work either. Please help solve the problems. Thanks.

---

<div class="post-metadata">

**Author:** ![xueliang\_qin](https://avatars.discourse-cdn.com/v4/letter/x/50afbb/32.png) [@xueliang\_qin](https://devforum.zoom.us/u/xueliang_qin)\
**Post date:** [January 26, 2018, 9:03am UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916/8 "2018-01-26T09:03:31Z")

</div>

onHostChangeNotification callback doesn’t work

---

<div class="post-metadata">

**Author:** ![dats\_liao](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dats_liao/32/464_2.png) [@dats\_liao](https://devforum.zoom.us/u/dats_liao)\
**Post date:** [January 26, 2018, 10:16am UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916/9 "2018-01-26T10:16:34Z")

</div>

please show me the code of your register callback logic. thanks.

---

<div class="post-metadata">

**Author:** ![xueliang\_qin](https://avatars.discourse-cdn.com/v4/letter/x/50afbb/32.png) [@xueliang\_qin](https://devforum.zoom.us/u/xueliang_qin)\
**Post date:** [January 26, 2018, 2:35pm UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916/10 "2018-01-26T14:35:02Z")

</div>

@Dats, my fault. I used to register the callback like this:&nbsp;

CMeetingParticipantsControllerDotNetWrap.Instance.Add\_CB\_onUserJoin, which doesn’t work. And I modified it as:

CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap().GetMeetingParticipantsController().Add\_CB\_onUserJoin, now it work well. Thanks.

---

<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:** [September 20, 2021, 8:52pm UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916/11 "2021-09-20T20:52:26Z")

</div>

Closing as solved.

-Tommy

---

<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:** [September 20, 2021, 8:52pm UTC](https://devforum.zoom.us/t/why-user-id-is-dynamically-allocated-and-how-can-i-get-my-own-user-id/916/12 "2021-09-20T20:52:29Z")

</div>

Closed on September 20, 2021, 8:52pm UTC


