Contact
If your application is using the core implementation type, you can use the TapCoreContactManager class to manage your user's contacts.
TapTalk Contact Method | Description |
Get all of the user's contact data from TapTalk.io | |
Get a detailed contact info with selected TapTalk.io user ID | |
Get a detailed contact info with selected Client user ID (xcUserID) | |
Add a user with selected TapTalk.io user ID to the active user's contacts | |
Add a user with selected phone number to the active user's contacts | |
Remove a user with selected TapTalk.io user ID from the active user's contacts | |
Get user's contact by username | |
Search user's contact list | |
Submit a report for a selected user | |
Submit a report for a selected message | |
Block a user from sending or receiving messages | |
Unblock a blocked user | |
Retrieve a list of blocked users | |
Retrieve a list of IDs from blocked users |
Get all of the user's contact data from TapTalk.io.
JavaScript
tapCoreContactManager.getAllUserContacts({
onSuccess: (contactList) => {
// do action here
},
onError: (errorCode, errorMessage) => {
// do action here
}
})
Get a detailed contact info with selected TapTalk.io user ID.
JavaScript
tapCoreContactManager.getUserDataWithUserID(USER_ID, {
onSuccess: (response) => {
// do action here
},
onError: (errorCode, errorMessage) => {
// do action here
}
})
Parameters
USER_ID
: (String) Taptalk.io User ID of the selected userGet a detailed contact info with selected Client user ID (xcUserID).
JavaScript
tapCoreContactManager.getUserDataWithXCUserID(XC_USER_ID, {
onSuccess: (response) => {
// do action here
},
onError: (errorCode, errorMessage) => {
// do action here
}
})
Parameters
XC_USER_ID
: (String) Client User ID of the selected userAdd a user with selected TapTalk.io user ID to the active user's contacts.
JavaScript
tapCoreContactManager.addToTapTalkContactsWithUserID(USER_ID, {
onSuccess: (response) => {
// do action here
},
onError: (errorCode, errorMessage) => {
// do action here
}
})
Parameters
USER_ID
: (String) Taptalk.io User ID of the contact to be addedAdd a user with selected phone number to the active user's contacts.JavaKotlin
JavaScript
tapCoreContactManager.addToTapTalkContactsWithPhoneNumber(PHONE_NUMBER, {
onSuccess: (response) => {
// do action here
},
onError: (errorCode, errorMessage) => {
// do action here
}
})
Parameters
PHONE_NUMBER
: (String) phone number of the contact to be addedRemove a user with selected TapTalk.io user ID from the active user's contacts.
tapCoreContactManager.removeFromTapTalkContacts(userID, {
onSuccess: (response) => {
// do action here
},
onError: (errorCode, errorMessage) => {
// do action here
}
})
Parameters
USER_ID
: (String) Taptalk.io User ID of the contact to removeCall this method to get User Contact by username.
tapCoreContactManager.getUserByUsername(USERNAME, ignoreCase, {
onSuccess: (response) => {
// do action here
},
onError: (errorCode, errorMessage) => {
// do action here
}
})
Parameters
USERNAME
: (String) username
IGNORE_CASE
: (Boolean) ignore case usernameCall this method to search user's contact list.
tapCoreContactManager.getFilterUserContacts(contactString, {
onContactFound: (contactList) => {
// do action here
},
onContactNotFound: () => {
// do action here
}
})
Parameters
CONTACT_STRING
: (String) keywordYou may call this method to submit a report for a selected user. Submitted reports can then be viewed through the dashboard.
tapCoreContactManager.reportUser(
USER_ID,
CATEGORY,
IS_OTHER_CATEGORY,
REASON,
{
onSuccess : (response) => {
// Successfully reported user
},
onError : (errorCode, errorMessage) => {
}
}
)
Parameters
USER_ID
: (String) ID of the user to report
CATEGORY
: (String) Category of the violation. max length is 100 characters
IS_OTHER_CATEGORY
: (Boolean) If the category is other than the predefined categories
REASON
: (String) reason why the user is reportedYou may call this method to submit a report for a selected message. Submitted reports can then be viewed through the dashboard.
tapCoreContactManager.reportMessage(
MESSAGE_ID,
ROOM_ID,
CATEGORY,
IS_OTHER_CATEGORY,
REASON,
{
onSuccess : (response) => {
// Successfully reported message
},
onError : (errorCode, errorMessage) => {
}
}
)
Parameters
MESSAGE_ID
: (String) unique server ID of the message to report
ROOM_ID
: (String) ID of the room where the message belongs to
CATEGORY
: (String) Category of the violation. max length is 100 characters
IS_OTHER_CATEGORY
: (Boolean) If the category is other than the predefined categories
REASON
: (String) reason why the message is reportedYou may block a user to stop conversation flow with the blocked user. Blocked users will not be able to send and receive message, or retrieve profile info from the active user.
tapCoreContactManager.blockUser(
USER_ID,
{
onSuccess : (response) => {
// Successfully blocked user
},
onError : (errorCode, errorMessage) => {
}
}
)
Parameters
USER_ID
: (String) ID of the user to blockYou may unblock a blocked user to let them send and receive message from the active user.
tapCoreContactManager.unblockUser(
USER_ID,
{
onSuccess : (response) => {
// Successfully unblocked user
},
onError : (errorCode, errorMessage) => {
}
}
)
Parameters
USER_ID
: (String) ID of the user to unblockYou may call this method to retrieve a list of blocked users.
tapCoreContactManager.getBlockedUserList({
onSuccess: (response) => {
// Successfully retrieved blocked users
},
onError: (errorCode, errorMessage) => {
}
});
You may call this method to retrieve a list of IDs from blocked users.
tapCoreContactManager.getBlockedUserIDs({
onSuccess: (res) => {
// Successfully retrieved blocked user IDs
},
onError: (errCode, errMes) => {
}
});
Last modified 4mo ago