Authentication
TapTalk.io Omnichannel SDK provides some essential methods to handle user authentication.

Authenticate User (Optional)

You can authenticate the user that is currently logged in before calling openTapTalkLiveView. To do this, provide the user's full name and email by calling authenticateUser from the TapTalkLive class after initializing the SDK.
Java
Kotlin
YourActivity.java
TapTalkLive.authenticateUser("FULL_NAME", "EMAIL", new TTLCommonListener() {
@Override
public void onSuccess(String successMessage) {
// Authentication successful
}
@Override
public void onError(String errorCode, String errorMessage) {
}
});
YourActivity.kt
TapTalkLive.authenticateUser("FULL_NAME", "EMAIL", object : TTLCommonListener() {
override fun onSuccess(successMessage: String?) {
// Authentication successful
}
override fun onError(errorCode: String?, errorMessage: String?) {
}
})
After successfully authenticated, user will no longer be required to fill name and email to create a case.

Logout and Clear TapTalkLive Data

Call this method when you need to logout and clear all local cached data from Omnichannel SDK.
Java
Kotlin
TapTalkLive.clearAllTapLiveData();
TapTalkLive.clearAllTapLiveData()