Reference
Fuselage
Channel Join
Joins yourself to the channel.
URL
Requires Auth
HTTP Method
/api/v1/channels.join
yes
POST

Payload

Argument
Example
Required
Description
roomId
ByehQjC44FwMeiLbX
Required
The channel's id
joinCode
1234
Optional
The join code of the room
The join code isn't needed if the user has the permission join-without-join-code

Example Call

1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
-H "Content-type: application/json" \
4
http://localhost:3000/api/v1/channels.join \
5
-d '{ "roomId": "ByehQjC44FwMeiLbX", "joinCode": "1234" }'
Copied!

Example Result

1
{
2
"channel": {
3
"_id": "nxXKHF2o2nzKYtFMM",
4
"name": "test",
5
"fname": "test",
6
"t": "c",
7
"msgs": 8,
8
"usersCount": 2,
9
"u": {
10
"_id": "rocketchat.internal.admin.test",
11
"username": "rocketchat.internal.admin.test"
12
},
13
"customFields": {},
14
"broadcast": false,
15
"encrypted": false,
16
"ts": "2019-01-16T12:00:04.783Z",
17
"ro": false,
18
"sysMes": true,
19
"default": false,
20
"_updatedAt": "2019-01-16T12:06:30.426Z",
21
"joinCodeRequired": true
22
},
23
"success": true
24
}
Copied!

Change Log

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