To register a new user use the below method. You will get the username and password in the response. By providing that username and password to the connect method you can connect in to the server further.
During the initialization, if the isTrialLicenseKey is set to
true in the initialization, users will be registered in the trial mode.
|Unique Id to Register the User. We accept only the AlphaNumeric String||String||true|
|key||Name of the Key||String|
|value||Name of the value||String or Boolean or Number|
FORCE_REGISTER is false and if it reached the maximum no of multiple-sessions, then registration will not success and it will throw a 405 exception. Either
FORCE_REGISTER should be true or one of the existing session need to be logged out to continue registration.
|data||Username, Password, isProfileUpdated, isSandbox||Object|
Make a connection to the server by using the credentials got as a response of the register method. Once the connection is made successfully, it returns a Promise with
200, else throws an Error.
This will also emit the connection status. It will be received in connectionListener callback function. If any error occurs while making a connection with the server, You will receive the error in the callback.
If Login needs to be done via QR Code scan from Mobile, generate new QR Code with below method.
Once the QR Code scanned successfully, the user will be with XMPP, and username and password will be received in callback response
|Canvas element id in which QR Code has to appended||String||true|
|Branding Logo in the QR Code||String||true|
|Signal Server URL for Socket Connection||String||true|
To set the Profile detail of the user, send a request as described below.
Once the request is successfully made, a callback userProfileListener will be triggered for the current user and also for the friends (Contacts of the current user) to get the latest profile details.
|Nickname of the User||String||true|
|Profile Image - Upload an image file or image URL||File / String||true|
Image as a URL
Image as a FILE
To set the user token locally.