Skip to main content

Authentication

Authentication​

Authentication verifies that the provided user id is correct and, therefore, it can initiate the chat.

MeetingLawyersSDK.getClientInstance().authenticate("userId", object : SDKCallbackWithoutData {
override fun onSuccess() {
// AUTH OK
}

override fun onError(message: String?) {
// AUTH KO
}
})

The result of the authentication does not return any value beyond the same verification of success or failure of the operation.

From a successful response, we can consider that the user is authenticated and MeetingLawyers environment is ready to show the active conversations of the user.

Logout​

The deauthenticate() method deletes all user cached data, including chat messages and professional list:

MeetingLawyersSDK.getClientInstance().deauthenticate(object : SDKCallbackWithoutData {
override fun onSuccess() {
// LOGOUT OK
}

override fun onError(message: String?) {
// LOGOUT KO
}
})

Next steps​