React to a conversation
A conversation context is mapped to your topic by using either the conversationid or the customid.
A conversation context is mapped to your topic by using either the conversationid or the customid. You can either react to the content itself (for example to LIKE an article/video/poll) or you can use the comment react api to react to an individual comment. This method is for commenting on the conversation topic level.
BODY Properties
- userid : (required) The ID of the user reacting to the comment. Anonymous reactions are not supported.
- reaction : (required) A string indicating the reaction you wish to capture, for example "like", or "emoji:{id}" where you can use the standard character code for your emoji.
- reacted : (required) true or false, to toggle the reaction on or off for this user.
Parameters
Values in the path and query string.
appid path The TalkLabs application ID assigned to your account.
Example:your-app-id conversationid path The TalkLabs assigned conversation ID.
Example:conversation-id JSON body
Send as application/json.
reaction userId The customer defined user ID from your application or identity system.
reacted {
"reaction": "like",
"reacted": true,
"userId": "u-8842"
} Common variations
Historical examples filtered through the current request schema.
React To Conversation Topic ("Like")
{
"reaction": "like",
"reacted": true,
"userId": "u-8842"
} React To Conversation ("Like")
{
"reaction": "like",
"reacted": true,
"userId": "u-8842"
} Status codes
Every JSON response uses the API result envelope.
200 OK ApiResult 400 Bad Request ApiResult 403 Forbidden ApiResult 404 Not Found ApiResult 500 Internal Server Error ApiResult {
"message": "",
"errors": {},
"data": {
"kind": "comment.comment",
"id": "5edfe3e686c2921148f12902",
"appid": "5ededa7086c2920e6ccc06f8",
"conversationid": "demo-conversation-id",
"commenttype": "comment",
"added": "2020-06-09T19:32:54.9919172Z",
"modified": "2020-06-09T19:32:54.9919172Z",
"userid": "u-8842",
"user": {
"kind": "app.user",
"userid": "u-8842",
"handle": "dave_m",
"handlelowercase": "georgew",
"displayname": "Dave M.",
"pictureurl": "https://example.com/users/u-8842s/photos/original/a9/c7/a6/44-1-george-washington-18-1549729902.jpg",
"profileurl": "https://example.com/users/u-8842shington",
"banned": false
},
"body": "This is a reply.",
"originalbody": "",
"hashtags": [],
"customtype": "",
"customid": null,
"custompayload": "",
"customtags": [],
"customfield1": "",
"customfield2": "",
"edited": false,
"censored": false,
"deleted": false,
"parentid": "5edfe3da86c2921148f12901",
"hierarchy": [
"5edfe3da86c2921148f12901"
],
"mentions": [],
"reactions": [
{
"type": "like",
"count": 1,
"users": [
{
"userid": "u-8842",
"handle": "dave_m",
"displayname": "Dave M."
}
]
}
],
"likecount": 1,
"replycount": 0,
"votecount": 0,
"votescore": 0,
"votes": [],
"moderation": "na",
"active": true,
"reports": []
}
}