You can set the user ID for a chat by adding an attribute into the template tag. these attributes are the same as the shortcodes.

You’ve successfully subscribed to TalkJS
Welcome back! You’ve successfully signed in.
Great! You’ve successfully signed up.
Your link has expired
Success! Check your email for magic link to sign-in.