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

Latest commit

 

History

History
60 lines (49 loc) · 1.9 KB

File metadata and controls

60 lines (49 loc) · 1.9 KB

Join Channel

Join a channel yourself.

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

Body Parameters

KeyExample ValueDescription
roomId*ByehQjC44FwMeiLbXThe channel ID that you want to join.
joinCode1234The join code of the room.

{% hint style="info" %} The join code isn't needed if the user has the permission join-without-join-code. {% endhint %}

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.join \
     -d '{ 
          "roomId": "ByehQjC44FwMeiLbX", 
          "joinCode": "1234" }'

Example Response

{
    "channel": {
        "_id": "nxXKHF2o2nzKYtFMM",
        "name": "test",
        "fname": "test",
        "t": "c",
        "msgs": 8,
        "usersCount": 2,
        "u": {
            "_id": "rocketchat.internal.admin.test",
            "username": "rocketchat.internal.admin.test"
        },
        "customFields": {},
        "broadcast": false,
        "encrypted": false,
        "ts": "2019-01-16T12:00:04.783Z",
        "ro": false,
        "sysMes": true,
        "default": false,
        "_updatedAt": "2019-01-16T12:06:30.426Z",
        "joinCodeRequired": true
    },
    "success": true
}

Change Log

Version Description
0.49.0 Added