List Messages By User
The purpose of this method is to get a list of messages or comments by a user, with count of replies and reaction data.
This method requires authentication.
The purpose of this method is to get a list of messages or comments by a user, with count of replies and reaction data. This way, you can easily make a screen in your application that shows the user a list of their comment contributions and how people reacted to it.
URL PARAMETERS
- roomid : (required) The ID of the chatroom to retreive the messages by this user from
- userid : (required) The ID of the user to fetch messages by
- cursorid : (optional) If null / "", starts at the first messsage, and if not null, resumes cursoring
Parameters
Values in the path and query string.
appid path The TalkLabs application ID assigned to your account.
Example:your-app-id roomid path The TalkLabs assigned room ID returned when the room was created.
Example:room-id userid path The customer defined user ID from your application or identity system.
Example:u-8842 cursor query The cursor returned by the previous page.
limit query The maximum number of records to return.
Example:200 Status codes
Every JSON response uses the API result envelope.
200 OK ApiResult 400 Bad Request ApiResult 403 Forbidden ApiResult 500 Internal Server Error ApiResult {
"message": "",
"errors": {},
"data": {
"kind": "list.chatevents",
"cursor": "5ec4aa385617e40ed4e82aaf",
"events": [
{
"kind": "chat.event",
"id": "5ec4aa2b5617e40ed4e82aad",
"roomid": "5ec3c1945617e21bd8c5567b",
"body": "Hello, Dev World!",
"added": "2020-05-20T03:55:22.9999147Z",
"ts": 637255437229999100,
"eventtype": "speech",
"userid": "userid_abe",
"user": {
"kind": "app.user",
"userid": "userid_abe",
"handle": "HonestAbe",
"handlelowercase": "honestabe",
"displayname": "Abraham Lincoln",
"pictureurl": "https://www.biography.com/.image/ar_1:1%2Cc_fill%2Ccs_srgb%2Cg_face%2Cq_auto:good%2Cw_300/MTU5MDUzMTE0Mzk2MTI0OTUy/abraham-lincoln-1809---18652c-sixteenth-president-of-the-united-states-of-america-photo-by-stock-montagestock-montagegetty-images_promo.jpg",
"profileurl": "https://www.biography.com/us-president/abraham-lincoln",
"banned": false
},
"customtype": "",
"customid": "",
"custompayload": "",
"customtags": [],
"customfield1": "",
"customfield2": "",
"replyto": null,
"parentid": "",
"hierarchy": [],
"edited": false,
"deleted": false,
"active": true,
"mutedby": [],
"shadowban": false,
"hashtags": [],
"likecount": 0,
"replycount": 0,
"reactions": [],
"moderation": "na",
"reports": []
},
{
"kind": "chat.event",
"id": "5ec4aa385617e40ed4e82aaf",
"roomid": "5ec3c1945617e21bd8c5567b",
"body": "Hello a second time!",
"added": "2020-05-20T03:55:36.9845354Z",
"ts": 637255437369845400,
"eventtype": "speech",
"userid": "userid_abe",
"user": {
"kind": "app.user",
"userid": "userid_abe",
"handle": "HonestAbe",
"handlelowercase": "honestabe",
"displayname": "Abraham Lincoln",
"pictureurl": "https://www.biography.com/.image/ar_1:1%2Cc_fill%2Ccs_srgb%2Cg_face%2Cq_auto:good%2Cw_300/MTU5MDUzMTE0Mzk2MTI0OTUy/abraham-lincoln-1809---18652c-sixteenth-president-of-the-united-states-of-america-photo-by-stock-montagestock-montagegetty-images_promo.jpg",
"profileurl": "https://www.biography.com/us-president/abraham-lincoln",
"banned": false
},
"customtype": "",
"customid": "",
"custompayload": "",
"customtags": [],
"customfield1": "",
"customfield2": "",
"replyto": null,
"parentid": "",
"hierarchy": [],
"edited": false,
"deleted": false,
"active": true,
"mutedby": [],
"shadowban": false,
"hashtags": [],
"likecount": 0,
"replycount": 0,
"reactions": [],
"moderation": "na",
"reports": []
}
]
}
}