Remove Role

Remove a role from a user. Optionally, you can remove this role from a specified scope.

HTTP MethodURLRequires Auth

POST

/api/v1/roles.removeUserFromRole

Permission required: access-permissions

Body Parameters

KeyExample ValueDescription

roleName*

guest

The role name.

username*

rocket.chat

The user name.

roomId

dK7vNYXMdHGLdukpL

The scope where the role should be removed from.

Example Call

curl -H "Content-type:application/json" \
     -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     http://localhost:3000/api/v1/roles.removeUserFromRole \
     -d '{ "roleName": "guest" }' \
     -d '{ "username": "rocket.chat" }' \

Example Response

{
    "success": true
}

Last updated

Rocket.Chat versions receive support for six months after release.