Set (replace) the entire whitelist for a channel
1 - Person channel2 - Group channel"ok" on success| Status Code | Description |
|---|---|
| 200 | Whitelist set successfully |
| 400 | Request parameter error |
| 403 | No management permission |
| 404 | Channel does not exist |
| 500 | Internal server error |
uids is an empty array:
| Privilege | Description | Applicable Condition |
|---|---|---|
| Send Permission | Can send messages to the channel | When whitelist mode is enabled |
| Bypass Restrictions | Bypass certain channel restrictions | Based on channel configuration |
| Priority Processing | Messages may receive priority processing | System configuration related |
| Conversation Guarantee | Ensure conversations are created normally | Person channels |
| Operation | Function | Use Case |
|---|---|---|
whitelist_add | Add users to existing whitelist | Incrementally add privileged users |
whitelist_set | Replace entire whitelist | Batch management, reset whitelist |
whitelist_remove | Remove specific users from whitelist | Remove specific user privileges |
| Situation | Result | Description |
|---|---|---|
| Both in blacklist and whitelist | Treated as blacklist | Blacklist has higher priority |
| Only in whitelist | Enjoy whitelist privileges | Normal whitelist user |
| Only in blacklist | Subject to blacklist restrictions | Normal blacklist user |
| In neither list | Regular user permissions | Default permission handling |
| Error Message | Cause | Solution |
|---|---|---|
| Channel ID cannot be empty | No channel ID provided | Ensure valid channel ID is provided |
| Channel type cannot be 0 | Invalid channel type | Use valid channel type (1 or 2) |
| Channel ID cannot contain special characters | Invalid channel ID format | Use alphanumeric characters and underscores |
| Remove all whitelist failed | Clear operation failed | Check channel status and permissions |
| Add whitelist failed | Add operation failed | Check user ID validity |