In order to use the abilities of the Javascript SDK in your client app, a TapTalk instance must be initiated in each client app through user authentication with 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.'s Authentication Flow

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

You can see the documentation on how to obtain Authentication Ticket from's Server on the Authentication in's Server API page.

Authenticate to server with an Authentication Ticket

taptalk.authenticateWithAuthTicket(AUTH_TICKET, CONNECT_WHEN_SUCCESS, { 
      onSuccess: () => {
           // do action here
      onError: (errorCode, errorMessage) => {
           // do action here


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

Check Authentication Status

You can check authentication status by calling isAuthenticated()

var isAuthenticated = tapTalk.isAuthenticated();

Logout and Clear Data

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

    onSuccess: (response) => {
       // do action here

Last updated