Authentication
Last updated
Last updated
In order to use the abilities of TapTalk.io 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 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 implementation for TapTalk.io's Mobile SDK by accessing iOS SDK Authentication or Android SDK Authentication.
IMPORTANT!
Server Key ID and Server Key Secret will be used to construct a request and add as a HTTP Header. To construct a request, please format your generated Server Key ID and Server Key Secret and wrap it to Base64, so the format will be like this:
encodeToBase64(SERVER_KEY_ID:SERVER_KEY_SECRET) *don't forget to add colon (:) between Server Key ID and Server Key Secret
Then, put the base64 string on your HTTP Header Field with key “Server-Key” and then construct URL request and parameter for the request.
Request auth ticket on behalf of the specified user, passing along the user's data to be saved to chat server. The auth ticket can be used to request an access token from the chat server. An auth ticket is valid for 1 hour before it expires.
The xcUserID
is used to identify an existing user. If it does not exist yet, the user will be saved as a new user.
Field
Type
Description
userIPAddress
string
(101) The user's IP address.
userAgent
string
(102) The user agent.
userPlatform
string
(103) The user's platform.
Values: "android", "ios", or "web"
userDeviceID
string
(104) The user's device ID.
xcUserID
string
(105) The user ID from customer's server (maximum 50 characters).
fullName
string
(106) The user's full name.
email (optional)
string
(107) The user's email address.
phone (optional)
string
(108) The user's phone, should start with country code.
username (optional)
string
(109) The user's username.
photoThumbnailURL (optional)
string
(110) The user's thumbnail picture image URL.
photoFullsizeURL (optional)
string
(111) The user's fullsize picture image URL.
userRoleCode (optional)
string
(112) The user's role code.
Field
Type
Description
userID
string
The user ID.
ticket
string
The The auth ticket to request an access token.
Name
Description
ParamValidationFailed
The parameter validation failed.
HeaderValidationFailed
The request header validation failed.