How to encode our user using JWT.IO lib ?

For better security, we do recommend using this method to encode your user data.
Your webmaster id param is 9999 and you password is secretPassword

List of Parameters to be encoded

webmasterid*: your webmasterid token

password*: your password

username*: username of the user

gender: Gender of user: must fit the genders defined in chatadmin - : male, female, couple By default is male

role: Role of the user: can be : admin, moderator, dj, user By default is user

image:Image or Avatar of the user : must be a link (https) to url of an image By default is random avatar

defaultRoom: Default room when enter the chat By default is the first room

So you do create your user like in php as an array:

            $password = 'secretPassword';
            $user = array('webmasterid'=>9999, 'password'=>$password, 'username'=>'John', 'gender'=>'male', 'role'=>'user', 'image'=>'');
Then you need to create an encrypted TOKEN from that user.
For that, we use library
For PHP, we use for instance: (if you use another langage, pick your library from

Let do it with PHP

Step1: encode the user with JWT::encode

Create the $user array and encode it

    $password = 'secretPassword';
    $user = array('webmasterid'=>9999, 'password'=>$password, 'username'=>'John', 'gender'=>'male', 'role'=>'user', 'image'=>'');
    $encodedUser = JWT::encode($user, $password);

As result, $encodedUser will contain base64 long encrypted string (encryptedUser)

Step2 : use that encoded script into your script

The pattern is:{webmasterid}/{encryptedUser}

Directly to access your chat with link
Integrate your chat with a script:
                <script src=""></script>