Skip to main content

@wildix/xbees-conversations-client > GetDirectChannelIdCommand

GetDirectChannelIdCommand class

Gets the channel ID of an existing or non-existing direct channel between the specified user and another member.

Signature:

export declare class GetDirectChannelIdCommand extends GetDirectChannelIdCommand_base 

Extends: GetDirectChannelIdCommand_base

Example

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

import { ConversationsClient, GetDirectChannelIdCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
// const { ConversationsClient, GetDirectChannelIdCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
const client = new ConversationsClient(config);
const input = { // GetDirectChannelIdInput
userId: "STRING_VALUE",
memberId: "STRING_VALUE",
memberToInvite: { // UserToInvite
email: "STRING_VALUE",
phone: "STRING_VALUE",
name: "STRING_VALUE",
colleague: true || false,
},
};
const command = new GetDirectChannelIdCommand(input);
const response = await client.send(command);
// { // GetDirectChannelIdOutput
// channelId: "STRING_VALUE", // required
// };