Skip to main content

@wildix/xbees-conversations-client > TagChannelCommand

TagChannelCommand class

Marks the channel with specified tag. A user can have up to 100 channels tagged for a single tag. If a user tries to tag more than 100 channels, the system will remove the oldest channel tagged if the force flag is specified; otherwise, a TaggedChannelsLimitReachedException will be thrown. The system will automatically remove the channel from the specified tag if the user leaves the channel or if the channel is removed. This operation is idempotent, meaning that if the channel is already tagged, no error will be thrown.

Signature:

export declare class TagChannelCommand extends TagChannelCommand_base 

Extends: TagChannelCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { ConversationsClient, TagChannelCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
// const { ConversationsClient, TagChannelCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
const client = new ConversationsClient(config);
const input = { // TagChannelInput
channelId: "STRING_VALUE", // required
userId: "STRING_VALUE",
tagId: "STRING_VALUE", // required
force: true || false,
};
const command = new TagChannelCommand(input);
const response = await client.send(command);
// {};