User/Contact API
Use these sets of API if you wish to sync your user or contact into OneTalk's system.
Request Auth Ticket
Request auth ticket for Live Chat on behalf of the specified user/contact, passing along the user's data to be saved to contacts. The auth ticket can be used to request an access token for Live Chat. An auth ticket is valid for 1 hour before it expires.
Header
API-Key
String
API key for accessing the API.
Request
customerUserID
String
User ID from customer's server.
Size Range 1..100
fullName
String
The user's full name.
Size Range 1..250
alias (optional)
String
The user's alias.
Size Range 1..100
email (optional)
String
The user's email address.
Size Range 1..250
phone (optional)
String
The user's phone, must start with country code.
Size Range 1..20
photoURL (optional)
String
The user's picture image URL
Success 200
success
boolean
If successful.
message
string
The message.
userID
string
The user ID from OneTalk.
ticket
string
The auth ticket to request an access token.
Error 4xx
ParamValidationFailed
The parameter validation failed.
HeaderValidationFailed
The request header validation failed.
TierNotSelected
The organization has not selected a tier.
Sync User Contact
Sync a user from the customer's server to OneTalk contacts.
The sync process will check for existing contacts using all the following keys:
customerUserID (required)
phone (optional)
If no contact is found, a new contact will be created. If exactly one contact is found using the sync keys, the contact will be updated. If more than one contacts are found, the sync will be rejected because duplicate keys are not allowed.
Customer user ID can't be changed for existing contacts. So, if the existing contact is already tied to a different customer user ID, the sync will be rejected. However, if the existing contact is not tied to any customer user ID yet, it will be updated to the specified customerUserID
.
Header
API-Key
API key for accessing the API.
Content-Type (optional)
Content type of the request body.
User-Agent (optional)
The user agent of the client accessing the API.
Request
customerUserID
String
UserID from customer's server.
Size Range 1..100
fullName
String
The user's full name.
Size Range 1..100
alias
String
The user's alias.
Size Range 1..100
String
The user's email address.
Size Range 1..100
phone
String
The user's phone, must start with country code.
Size Range 1..100
photoURL
String
The user's picture image URL.
Success 200
success
boolean
If saved successfully.
message
string
The message.
userID
string
The user ID from OneTalk.
Error 4xx
ParamValidationFailed
The parameter validation failed.
HeaderValidationFailed
The request header validation failed.
TierNotSelected
The organization has not selected the tier.
Last updated