Authentication - Android 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 navigateToOneTalk. To do this, you can add an authentication method in the previously created Java Module. (See Get Started - Android). We will add a @ReactMethod named authenticateUser.
import android.content.Intent;

import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;

import org.jetbrains.annotations.NotNull;

class OneTalkStarterModule extends ReactContextBaseJavaModule {

    OneTalkStarterModule(ReactApplicationContext reactContext) {

    public String getName() {
        return "OneTalkStarter";

    void navigateToOneTalk() {
        Intent intent = new Intent(getReactApplicationContext(), OneTalkWrapperActivity.class);
    void authenticateUser(String name, String email, Callback successCallback, Callback errorCallback) {
        TapTalkLive.authenticateUser(name, email, new TTLCommonListener() {
            public void onSuccess(String successMessage) {
            public void onError(String errorCode, String errorMessage) {


name: (String) name of the user to be authenticated

email: (String) email of the user to be authenticated

successCallback: (Callback) invoked when the authentication is successful

errorCallback: (Callback) invoked when an error occurred during authentication

You can then call the method from JavaScript as such:

                                              (successMessage) => {
      // Successfully authenticated user
                                              (errorMessage) => {
      // An error occurred during authentication

After successfully authenticated, user will no longer be required to fill name and email to create a case.

Logout and Clear TapTalkLive Data

You may also add another method when you need to logout and clear all local cached data from Omnichannel SDK. We will name this method clearAllTapLiveData.
import ...

class OneTalkStarterModule extends ReactContextBaseJavaModule {

    void clearAllTapLiveData() {

You can then call the method from JavaScript when needed.


Last updated