Set Channel Join Code
    • Dark
      Light
    • PDF

    Set Channel Join Code

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/channels.setJoinCode

    Set the code required to join the channel. If it is set, users must use the join code to successfully join the channel.

    Changelog

    VersionDescription
    0.49.0Added
    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Body parameters
    Example 1
    {
      "roomId": "ByehQjC44FwMeiLbX",
      "joinCode": "87hsyi9"
    }
    object
    roomId
    string Required

    The channel's id

    joinCode
    string Required

    The join code that will be required for any user to join this channel.

    Responses
    200

    OK

    Example 1
    {
      "channel": {
        "_id": "WDuJLFkjwk6L7LdFC",
        "fname": "new",
        "customFields": {
          "organization": "tra-la-la"
        },
        "topic": "",
        "broadcast": false,
        "encrypted": false,
        "name": "new",
        "t": "c",
        "msgs": 73,
        "usersCount": 45,
        "u": {
          "_id": "rbAXPnMktTFbNpwtJ",
          "username": "roxie"
        },
        "ts": "2023-04-05T22:34:38.936Z",
        "ro": false,
        "default": true,
        "sysMes": true,
        "_updatedAt": "2023-09-27T05:40:39.687Z",
        "lastMessage": {
          "_id": "mBfC3sbNhfwcL4AQu",
          "rid": "WDuJLFkjwk6L7LdFC",
          "msg": "It should be good",
          "ts": "2023-09-16T07:37:59.691Z",
          "u": {
            "_id": "rbAXPnMktTFbNpwtJ",
            "username": "test.test",
            "name": "test test"
          },
          "_updatedAt": "2023-09-16T07:37:59.815Z",
          "urls": [],
          "mentions": [],
          "channels": [],
          "md": [
            {
              "type": "PARAGRAPH",
              "value": [
                {
                  "type": "PLAIN_TEXT",
                  "value": "It should be good"
                }
              ]
            }
          ]
        },
        "lm": "2023-09-16T07:37:59.691Z",
        "announcement": "Test out everything",
        "description": "Testing the room",
        "joinCodeRequired": true
      },
      "success": true
    }
    Expand All
    object
    channel
    object
    _id
    string
    fname
    string
    customFields
    object
    organization
    string
    topic
    string
    broadcast
    boolean
    encrypted
    boolean
    name
    string
    t
    string
    msgs
    integer
    usersCount
    integer
    u
    object
    _id
    string
    username
    string
    ts
    string
    ro
    boolean
    default
    boolean
    sysMes
    boolean
    _updatedAt
    string
    lastMessage
    object
    _id
    string
    rid
    string
    msg
    string
    ts
    string
    u
    object
    _id
    string
    username
    string
    name
    string
    _updatedAt
    string
    urls
    Array of object
    object
    mentions
    Array of object
    object
    channels
    Array of object
    object
    md
    Array of object
    object
    type
    string
    value
    Array of object
    object
    type
    string
    value
    string
    lm
    string
    announcement
    string
    description
    string
    joinCodeRequired
    boolean
    success
    boolean

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.