Skip to content
This repository was archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
46 lines (36 loc) · 1.75 KB

File metadata and controls

46 lines (36 loc) · 1.75 KB

Add All Users to a Channel

Adds all of the users of the Rocket.Chat server to the channel.

HTTP MethodURLRequires Auth
POST/api/v1/channels.addAllyes

Body Parameters

KeyExample ValueDescription
roomId*ByehQjC44FwMeiLbXThe channel's id
activeUsersOnlytrueAdd active users only. By default, the value is false.

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 Response

{
   "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

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