I'm trying to add a user to a usergroup (and by that trying to use the API call usergroups.users.update)
I'm using a workspace token that has the scope usergroups:write and usergroups:read (complete list: channels:read, channels:write, chat:write, groups:write, im:write, identity:read:user, usergroups:read, usergroups:write, users:read, users:read.email, users.profile:write)
The payload is:
{"usergroup":"SCGM0xxxx","users":"U5W2Rxxxx"}
(Lower case xxxx to hide identity)
POST from Curl:
POST /api/usergroups.users.update HTTP/1.1
The result from the POST request to usergroups.users.update simply returns
{
"ok" => false
"error" => "permission_denied"
}
The documentation states:
The user does not have permission to update the list of users for a User Group.
Is there any other setting I need to configure to make this work? I have reinstalled the app after changing the oauth scopes. I added both usergroups:read and usergroups:write at the same time and I can use the API call usergroups.list
.