This method allows adding members to a given channel. The user adding the members must be a member of the channel and must have permission to modify the member list.
The method endpoint is https://api.flock.co/v1/channels.addMembers
and follows the method calling conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
token | String | Yes | Authentication token of the user |
channelId | String | Yes | Id of the channel |
members | Array | Yes | An array of user ids that will be added to the channel |
Response
An object where the keys are user ids that were to be added and the value is a ChannelMemberStatus, indicating whether the user was successfully added or not.
Example
{ "members": { "u:<id1>": { "status": "added" }, "u:<id2>": { "status": "failed", "error": "UserNotFound" } } }