customUserId property does not exist

On this page:
https://marketplace.zoom.us/docs/sdk/video/android/essential/create-join-session

customUserId is shown as a property of SDKSessionContext

This property does not exist. I need to associate a custom user id with a video and it is not clear how to do this since this property does not exist.

Hi @AndroidDev,

It turns out that our documentation has some outdated information. Thanks for pointing that out! We’ll get that updated ASAP. The equivalent of this field is available through the JWT’s user_identity field in the payload.

Thanks!

When you go to update the document, make sure to indicate clearly that the user_identity in the JWT maps to the customIdentity property in a ZoomInstantSDKUser instance.

Thanks.

Hi @AndroidDev,

Since the format of the JWT is universal across all platforms, this information can already be found in the Authentication section of our documentation. :slightly_smiling_face:

Please let me know if you think this could be made clearer for your use case and we will be happy to investigate additional changes.

Thanks!

Hi Jon,

This is poorly written. After setting the user_identity field in the JWT, this identity is in fact returned in an instance of ZoomInstantSDKUser under the customIdentity property. This is not documented anywhere and there is no correlation between user_identity and customIdentity. To make matters worse, the value you provide with user_identity IS NOT the value that customIdentity gets set to. The value set in customIdentity is a combination of the user_identity plus some garbled text appended after it. For example, if I set user_identity to “1000”, the customIdentity can be returned as “1000XyEvTk18J”. The first part of that is the user_identity I set. But this means I have to add code in order to separate my own user id from the garbled text. For example, I could set the user_identity to “1000_”. This will result in the customIdentity being returned as “1000_XyEvTk18J”. I can then identify my user by extracting the text up the underscore.

To be honest, this is very poorly designed. Why on earth would you append a bunch of garbled text to the end of my user id? Makes no sense. You really need to update your documentation to clearly show what is going on here.

Thanks!

Hi @AndroidDev,

We can definitely work on clarifying what this maps to in our documentation. Thank you for the suggestion!

Regarding the text being appended to the ID, this seems like a bug to me. We will need to investigate this behavior and identify whether or not this is working as expected.

Thanks!

1 Like

Hi there,

This topic is tagged as Android, but I want to point out, that the issue applies to iOS as well. Surely because of the shared native code.

As mentioned the missing field customUserId on the session context can be set through the JWT:

{
  "app_key": "…",
  "version": 1,
  "user_identity": "user",
  "iat": 1618312532,
  "exp": 1618485332,
  "tpc": "session"
}

Which gives me the same strange id suffix as @AndroidDev:

id: EDsNtXUNIk76MT3ZbadmmFErpFZh8IxVWC9Yg2tYSr4= 
customUserId: user13mUjv50WNRgTRytY

Hopefully this can be fixed for all platforms.

In addition it seems like user_identity is limited to 16 characters. The JWT accepts more of course, but I will not be able to join the session.

This works

"user_identity": "1234567890123456",

but this doesn’t

"user_identity": "12345678901234567",

Hi @blindgaenger, thanks for bringing this up.

We are aware that this impacts other platforms and will keep that in mind as we investigate this.

Regarding the 16 character limit, we will need to investigate whether or not this is intentional and update our documentation to include this limit if it is intentional.

Thanks!