Sets whether the channel is read-only or not.
HTTP Method | URL | Requires Auth |
---|
POST | /api/v1/channels.setReadOnly | yes |
Key | Example Value | Description |
---|
roomId * | ByehQjC44FwMeiLbX | The channel ID. |
readOnly * | true | Boolean of whether the room is read-only or not. |
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
-H "Content-type: application/json" \
https://localhost:3000/api/v1/channels.setReadOnly \
-d '{
"roomId": "ByehQjC44FwMeiLbX",
"readOnly": true }'
{
"channel": {
"_id": "ByehQjC44FwMeiLbX",
"name": "testing0",
"t": "c",
"msgs": 0,
"u": {
"_id": "aiPqNoGkjpNDiRx6d",
"username": "goose160"
},
"ts": "2017-01-05T18:02:50.754Z",
"ro": true,
"sysMes": true,
"_updatedAt": "2017-01-05T19:02:24.429Z",
"usernames": [
"goose160",
"graywolf336"
],
"joinCodeRequired": true,
"muted": []
},
"success": true
}
Version |
Description |
0.49.0 |
Added |