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

Latest commit

 

History

History
54 lines (44 loc) · 1.79 KB

File metadata and controls

54 lines (44 loc) · 1.79 KB

Set Channel Join Code

Sets the code required to join the channel.

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

Body Parameters

KeyExample ValueDescription
roomId*ByehQjC44FwMeiLbXThe channel ID.
joinCode*my-join-codeThe join code that users will require to join the channel.

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

Example Response

{
    "channel": {
        "_id": "ByehQjC44FwMeiLbX",
        "name": "testing0",
        "t": "c",
        "msgs": 0,
        "u": {
            "_id": "aiPqNoGkjpNDiRx6d",
            "username": "goose160"
        },
        "ts": "2017-01-05T18:02:50.754Z",
        "ro": false,
        "sysMes": true,
        "_updatedAt": "2017-01-05T18:41:48.840Z",
        "usernames": [
            "goose160",
            "graywolf336"
        ],
        "joinCodeRequired": true
    },
    "success": true
}

Change Log

Version Description
0.49.0 Added