groups.addMember()
Add a member to a group.
Definition
client.groups.addMember(groupId: string|Group,memberId: string|User,):Promise<void,Error>
Parameters
Parameter | Type | Description |
---|---|---|
groupId | string |Group | The group ID or group model |
memberId | string |User | The user ID or user model |
Returns
An error will be thrown if the operation failed, otherwise the Promise
will resolve.
Example
await client.groups.addMember('some-group-id','some-user-id');console.log('added member');