Get the messages in which you are mentioned (users are mentioned with the @ symbol). Visit the Messages user guide to learn more.
Changelog
| Version | Description |
|---|---|
| 2.2.0 | Added |
The authToken of the authenticated user.
The userId of the authenticated user.
The room ID.
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.
List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, { "value": -1, "_id": 1 }. Refer to the official documentation to learn more.
OK
{
"messages": [
{
"_id": "p93m92bPRudzoJ7oW",
"rid": "6GFJ3tbmHiyHbahmC",
"msg": "@test.john hello",
"ts": "2023-10-16T23:27:02.945Z",
"u": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
},
"_updatedAt": "2023-10-16T23:27:03.071Z",
"urls": [],
"mentions": [
{
"_id": "5fRTXMt7DMJbpPJfh",
"username": "test.john",
"name": "Test John",
"type": "user"
}
],
"channels": [],
"md": [
{
"type": "PARAGRAPH",
"value": [
{
"type": "MENTION_USER",
"value": {
"type": "PLAIN_TEXT",
"value": "test.john"
}
},
{
"type": "PLAIN_TEXT",
"value": " hello"
}
]
}
]
},
{
"_id": "4Q8nmha5doDHus5YR",
"rid": "6GFJ3tbmHiyHbahmC",
"msg": "@test.john",
"ts": "2023-10-16T23:26:38.611Z",
"u": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
},
"_updatedAt": "2023-10-16T23:26:38.728Z",
"urls": [],
"mentions": [
{
"_id": "5fRTXMt7DMJbpPJfh",
"username": "test.john",
"name": "Test John",
"type": "user"
}
],
"channels": [],
"md": [
{
"type": "PARAGRAPH",
"value": [
{
"type": "MENTION_USER",
"value": {
"type": "PLAIN_TEXT",
"value": "test.john"
}
}
]
}
]
}
],
"count": 2,
"offset": 0,
"total": 2,
"success": true
}Bad Request
{
"success": false,
"error": "The required \"roomId\" query param is missing. [error-invalid-params]",
"errorType": "error-invalid-params"
}{
"success": false,
"error": "error-not-allowed"
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}