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

Latest commit

 

History

History
32 lines (23 loc) · 1.4 KB

File metadata and controls

32 lines (23 loc) · 1.4 KB

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.removeUserFromRoleyes

{% hint style="info" %} Permission required: access-permissions {% endhint %}

Body Parameters

KeyExample ValueDescription
roleName*guestThe role name.
username*rocket.chatThe user name.
roomIddK7vNYXMdHGLdukpLThe 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
}