TapTalk.io Documentation
  • Introduction
  • OneTalk Omnichannel Documentation
    • Getting Started with OneTalk
      • Team Members
      • Add Topic
      • Assign Agent to Topic
      • Paid Proactive Chat
    • Channel Integration
      • Telegram Integration
      • WhatsApp SME Integration
      • Instagram DM Integration
      • Facebook Messenger Integration
      • Live Chat Integration (iOS, Android, Web)
        • OneTalk Live Chat for Android
          • Get Started
          • Event Listener
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for iOS
          • Get Started
          • Background Process in TapTalk.io Omnichannel iOS
          • Event Delegate
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for Web
          • Get Started
          • Callback
          • Method
        • OneTalk Live Chat for React Native
          • Get Started - Android
          • Authentication - Android
          • Get Started - iOS
          • Authentication - iOS
        • OneTalk Live Chat for Flutter
          • Get Started - Android
          • Get Started - iOS
      • Google Business Messages Integration
      • Google Business Profile Integration
      • Tokopedia Integration
    • Integration API
      • Inbox API
      • User/Contact API
    • Live Chat Widget Callback Function
    • Social Channel Button
    • Custom Chatbot Integration
      • Get Started
      • Edit or Delete Chatbot
      • Development
    • QnA via API
    • Webhook
  • PowerTalk Chat SDK Documentation
    • Getting Started with PowerTalk
    • PowerTalk Android
      • Get Started
      • Enable Chat Features
      • Authentication
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Connection
      • Event Listener
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk iOS
      • Get Started
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Implement Application Delegate
      • Authentication
      • Connection
      • Event Delegate
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk React Native
      • Get Started - Android
      • Get Started - iOS
    • PowerTalk Flutter
      • Get Started - Android
      • Get Started - iOS
    • Javascript SDK
      • Get Started
      • Authentication
      • Connection
      • General
      • Event Listener
      • User
      • Room List
      • Chat Room
      • Messages
      • Contact
      • Message Type
    • Server API
      • Get Started
      • Base URL
      • Authentication
      • User
      • Contact
      • Message
      • Room
    • Webhook
      • Get Started
      • Webhook Payload
  • MeetTalk SDK Documentation
    • Getting Started with MeetTalk
    • MeetTalk Android
      • Get Started
      • Event Listener
    • MeetTalk iOS
      • Get Started
      • Implement Application Delegate
      • Event Delegate
  • SendTalk API Documentation
    • Introduction
    • Whatsapp Verification
Powered by GitBook
On this page
  • Authenticate to TapTalk.io server with an Authentication Ticket
  • Check Authentication Status
  • Logout and Clear TapTalk.io Data
  • Clear TapTalk.io Data

Was this helpful?

  1. PowerTalk Chat SDK Documentation
  2. PowerTalk Android

Authentication

PreviousEnable Chat FeaturesNextTapUI and TapCore

Last updated 1 month ago

Was this helpful?

In order to use the abilities of the iOS SDK in your client app, a TapTalk instance must be initiated in each client app through user authentication with TapTalk.io server. An authenticated user account allows the instance to communicate and interact with the server. The following explains how to authenticate your user with the server.

When the user logs in to your application, your backend server will have to request an Authentication Ticket from TapTalk.io server. TapTalk.io server will return the requested Authentication Ticket and user ID to your backend server. The client application (iOS or Android) can then retrieve the ticket from your backend server to implement TapTalk.io's SDK by initializing the SDK using the obtained Authentication Ticket.

You can see the documentation on how to obtain Authentication Ticket from TapTalk.io's Server on the .

Authenticate to TapTalk.io server with an Authentication Ticket

Note: authentication should only be called once before the user is logged in or when the callback onTapTalkRefreshTokenExpired() is triggered in TapListener

import io.taptalk.TapTalk.Helper.TapTalk;
import io.taptalk.TapTalk.Listener.TapCommonListener;

...

TapTalk.authenticateWithAuthTicket(AUTH_TICKET, CONNECT_ON_SUCCESS, new TapCommonListener() {
    @Override
    public void onSuccess(String successMessage) {
        // Authentication successful
    }

    @Override
    public void onError(String errorCode, String errorMessage) {

    }
});
import io.taptalk.TapTalk.Helper.TapTalk
import io.taptalk.TapTalk.Listener.TapCommonListener

...

TapTalk.authenticateWithAuthTicket(AUTH_TICKET, CONNECT_ON_SUCCESS, object : TapCommonListener() {
    override fun onSuccess(successMessage: String?) {
        // Authentication successful
    }

    override fun onError(errorCode: String?, errorMessage: String?) {

    }
})

Parameters AUTH_TICKET : (String) an authentication ticket is required for this method CONNECT_WHEN_SUCCESS: (BOOL) if set to YES, application will connect to TapTalk.io server after authentication is successfully completed

Check Authentication Status

You can check authentication status by calling isAuthenticated() method

import io.taptalk.TapTalk.Helper.TapTalk;

...

boolean isAuthenticated = TapTalk.isAuthenticated();
import io.taptalk.TapTalk.Helper.TapTalk

...

var isAuthenticated = TapTalk.isAuthenticated()

Logout and Clear TapTalk.io Data

Call this method when you need to logout and clear all local cached data from TapTalk.io.

import io.taptalk.TapTalk.Helper.TapTalk;

...

// Logout from TapTalk.io
TapTalk.logoutAndClearAllTapTalkData();
import io.taptalk.TapTalk.Helper.TapTalk;

...

// Logout from TapTalk.io
TapTalk.logoutAndClearAllTapTalkData()

Clear TapTalk.io Data

You can clear all TapTalk.io local cached data by calling clearAllTapTalkData() method.

import io.taptalk.TapTalk.Helper.TapTalk;

...

TapTalk.clearAllTapTalkData();
import io.taptalk.TapTalk.Helper.TapTalk

...

TapTalk.clearAllTapTalkData()
Authentication in TapTalk.io's Server API page
TapTalk.io's Authentication Flow