Get Channel Roles

Prev Next
Get
/api/v1/channels.roles

Lists all user's roles in the channel.

Changelog

Version Description
0.65.0 Added
Query parameters
roomId
string

The room ID. It is required if the roomName is not provided.

Exampledlpfuijw7ej
roomName
string

The room name. It is required if the roomId is not provided.

Examplegeneral
Responses
200

OK

Success
{
  "roles": [
    {
      "_id": "rGNoXwYuZshq9FENQ",
      "rid": "WDuJLFkjwk6L7LdFC",
      "u": {
        "_id": "rbAXPnMktTFbNpwtJ",
        "username": "roxie"
      },
      "roles": [
        "owner"
      ]
    },
    {
      "_id": "64ef8a982c26843a68c1f7ae",
      "rid": "WDuJLFkjwk6L7LdFC",
      "u": {
        "_id": "5fRTXMt7DMJbpPJfh",
        "username": "test.test",
        "name": "Testtest"
      },
      "roles": [
        "leader"
      ]
    }
  ],
  "success": true
}
Expand All
object
roles
Array of object
object
_id
string
rid
string
u
object
_id
string
username
string
name
string
roles
Array of string
string
success
boolean
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string