Reference
Fuselage
Channel messages
Lists all of the specific channel messages on the server. It supports the Offset, Count, and Sort Query Parameters along with Query and Fields Query Parameters.
URL
Requires Auth
HTTP Method
/api/v1/channels.messages
yes
GET

Query Parameters

Argument
Example
Required
Description
roomId
ByehQjC44FwMeiLbX
Required(if no roomName
The channel's id
roomName
testChannel
Required(if no roomId)
The channel's name

Example Call

1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
http://localhost:3000/api/v1/channels.messages?roomId=ByehQjC44FwMeiLbX
Copied!

Example Result

1
{
2
"messages": [
3
{
4
"_id": "xadufzmxzYQp4H9py",
5
"alias": "test",
6
"msg": "Example message",
7
"attachments": [],
8
"parseUrls": true,
9
"bot": {
10
"i": "MnQyfhWt5LqZotyfc"
11
},
12
"groupable": false,
13
"ts": "2018-10-05T01:10:47.524Z",
14
"u": {
15
"_id": "rocket.cat",
16
"username": "rocket.cat",
17
"name": "Rocket.Cat"
18
},
19
"rid": "GENERAL",
20
"_updatedAt": "2018-10-05T13:42:51.163Z",
21
"reactions": {
22
":grin:": {
23
"usernames": [
24
"marcos.defendi"
25
]
26
}
27
},
28
"mentions": [],
29
"channels": [],
30
"starred": {
31
"_id": "KPkEYwKKBKZnEEPpt"
32
}
33
},
34
{
35
"_id": "id-1538701845987",
36
"rid": "GENERAL",
37
"msg": "This message was edited via API",
38
"alias": "Gruggy",
39
"emoji": ":smirk:",
40
"avatar": "http://res.guggy.com/logo_128.png",
41
"attachments": [
42
{
43
"collapsed": false,
44
"color": "#ff0000",
45
"text": "Yay for gruggy!",
46
"ts": "2016-12-09T16:53:06.761Z",
47
"message_link": "https://google.com",
48
"thumb_url": "http://res.guggy.com/logo_128.png",
49
"author_name": "Bradley Hilton",
50
"author_link": "https://rocket.chat/",
51
"author_icon": "https://avatars.githubusercontent.com/u/850391?v=3",
52
"title": "Attachment Example",
53
"title_link": "https://youtube.com",
54
"title_link_download": true,
55
"image_url": "http://res.guggy.com/logo_128.png",
56
"audio_url": "http://www.w3schools.com/tags/horse.mp3",
57
"video_url": "http://www.w3schools.com/tags/movie.mp4",
58
"fields": [
59
{
60
"short": true,
61
"title": "Test",
62
"value": "Testing out something or other"
63
},
64
{
65
"short": true,
66
"title": "Another Test",
67
"value": "[Link](https://google.com/) something and this and that."
68
}
69
]
70
}
71
],
72
"ts": "2018-10-05T01:10:45.994Z",
73
"u": {
74
"_id": "rocketchat.internal.admin.test",
75
"username": "rocketchat.internal.admin.test",
76
"name": "RocketChat Internal Admin Test"
77
},
78
"_updatedAt": "2018-10-05T01:10:47.064Z",
79
"editedBy": {
80
"_id": "rocketchat.internal.admin.test",
81
"username": "rocketchat.internal.admin.test"
82
},
83
"editedAt": "2018-10-05T01:10:46.384Z",
84
"reactions": {
85
":smile:": {
86
"usernames": [
87
"rocketchat.internal.admin.test"
88
]
89
},
90
":squid:": {
91
"usernames": [
92
"rocketchat.internal.admin.test"
93
]
94
},
95
":bee:": {
96
"usernames": [
97
"rocketchat.internal.admin.test"
98
]
99
},
100
":ant:": {
101
"usernames": [
102
"rocketchat.internal.admin.test"
103
]
104
}
105
},
106
"mentions": [],
107
"channels": [],
108
"urls": []
109
},
110
],
111
"count": 2,
112
"offset": 0,
113
"total": 2,
114
"success": true
115
}
Copied!

Change Log

Version
Description
0.59.0
Added
Last modified 8mo ago
Export as PDF
Copy link
Edit on GitHub