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 iOS

Authentication

PreviousImplement Application DelegateNextConnection

Last updated 28 days 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

AppDelegate.m
#import <TapTalk/TapTalk.h>
  
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    //Other Code
    ...
    
    [[TapTalk sharedInstance] authenticateWithAuthTicket:AUTH_TICKET connectWhenSuccess:CONNECT_WHEN_SUCCESS success:^{
        //Success connect to TapTalk.io server
    }
    failure:^(NSError *error) {
        //Failed connect to TapTalk.io server
    }];
}

Parameters AUTH_TICKET : (String) an authentication ticket is required for this method CONNECT_WHEN_SUCCESS: (boolean) if set to true, 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 <TapTalk/TapTalk.h>

BOOL isAuthenticated = [[TapTalk sharedInstance] 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 <TapTalk/TapTalk.h>

// Call to logout and clear all local data from TapTalk.io
[[TapTalk sharedInstance] logoutAndClearAllTapTalkData];

Clear TapTalk.io Data

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

#import <TapTalk/TapTalk.h>

[[TapTalk sharedInstance] clearAllTapTalkData];

Note: authentication should only be called once before the user is logged in or when the callback tapTalkRefreshTokenExpired is triggered in

Authentication in TapTalk.io's Server API page
TapTalk.io's Authentication Flow
TapTalkDelegate