This interface is primarily used for internal system calls and cluster node communication. External direct use is not recommended.
Overview
Set subscribers for a temporary channel. This is an internal API used for cluster node communication to manage temporary channel subscriptions. Temporary channels are used for special scenarios such as temporary groups or sessions, and automatically create and manage channel tags.Request Body
Required Parameters
Temporary channel ID, cannot contain special characters
List of user IDs to set as subscribers for the temporary channel
User ID
Response Fields
Operation status, returns
"ok" on successStatus Codes
| Status Code | Description |
|---|---|
| 200 | Temporary channel subscribers set successfully |
| 400 | Request parameter error |
| 500 | Internal server error |
Temporary Channel Mechanism
Temporary Channel Features
- Temporary Nature: Used for special scenarios like temporary groups or sessions
- Auto Management: System automatically creates and manages channel tags
- Cluster Communication: Primarily used for internal communication between cluster nodes
- Subscription Management: Supports dynamic setting of subscriber lists
Use Cases
| Scenario | Description | Applicable Situation |
|---|---|---|
| Temporary Groups | Create temporary discussion groups | Short-term project collaboration |
| Session Migration | Migrate sessions between cluster nodes | Load balancing |
| System Maintenance | Temporarily reorganize channel structure | System upgrades |
Important Notes
Internal API WarningThis interface is designed for internal system calls. Direct use may cause:
- Data inconsistency
- Cluster state anomalies
- Unexpected system behavior
Parameter Restrictions
- Channel ID: Cannot be empty, cannot contain special characters
- User List: Must contain at least one user ID
- Character Length: Channel ID maximum 64 characters
Error Handling
| Error Message | Cause | Solution |
|---|---|---|
| channel_id cannot be empty | No channel ID provided | Ensure valid channel ID is provided |
| uids cannot be empty | User list is empty | Provide at least one user ID |
| Channel ID cannot contain special characters | Invalid channel ID format | Use alphanumeric characters and underscores |
| Failed to get channel’s cluster node | Cluster communication error | Check cluster status |
| Failed to create tag | Tag system error | Check tag service status |
Best Practices
- Internal Use Only: Avoid calling directly in client applications
- Parameter Validation: Ensure all parameters are correctly formatted
- Error Handling: Implement comprehensive error handling mechanisms
- Monitor Logs: Record API calls for troubleshooting
- Cluster Status: Ensure cluster status is normal before calling
Related APIs
- Create Channel - Create standard channels
- Add Channel Subscribers - Add standard channel subscribers
- Remove Channel Subscribers - Remove standard channel subscribers

