Links

Channel Add All

Adds all of the users of the Rocket.Chat server to the channel.
URL
Requires Auth
HTTP Method
/api/v1/channels.addAll
yes
POST

Payload

Argument
Example
Required
Description
roomId
ByehQjC44FwMeiLbX
Required
The channel's id
activeUsersOnly
true
Optional Default: false
Add active users only

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
-H "Content-type: application/json" \
https://localhost:3000/api/v1/channels.addAll \
-d '{ "roomId": "ByehQjC44FwMeiLbX" }'

Example Result

{
"channel": {
"_id": "ByehQjC44FwMeiLbX",
"name": "channelname",
"t": "c",
"usernames": [
"example",
"rocket.cat"
],
"msgs": 0,
"u": {
"_id": "aobEdbYhXfu5hkeqG",
"username": "example"
},
"ts": "2016-05-30T13:42:25.304Z"
},
"success": true
}

Change Log

Version
Description
0.55.0
Added activeUsersOnly param
0.48.0
Renamed to channels.addAll from channel.addAll