Skip to main content

@wildix/classound-client > SendWhatsAppMessageCommand

SendWhatsAppMessageCommand class

Signature:

export declare class SendWhatsAppMessageCommand extends SendWhatsAppMessageCommand_base 

Extends: SendWhatsAppMessageCommand_base

Example

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

import { ClassoundClient, SendWhatsAppMessageCommand } from "@wildix/classound-client"; // ES Modules import
// const { ClassoundClient, SendWhatsAppMessageCommand } = require("@wildix/classound-client"); // CommonJS import
const client = new ClassoundClient(config);
const input = { // SendWhatsAppMessageInput
from: "STRING_VALUE", // required
to: "STRING_VALUE", // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
message: "STRING_VALUE", // required
extension: "STRING_VALUE", // required
media: [ // StringList
"STRING_VALUE",
],
userId: "STRING_VALUE",
channelId: "STRING_VALUE",
messageId: "STRING_VALUE",
};
const command = new SendWhatsAppMessageCommand(input);
const response = await client.send(command);
// { // SendWhatsAppMessageOutput
// type: "STRING_VALUE",
// success: true || false,
// company: "STRING_VALUE",
// status: "STRING_VALUE",
// id: [ // StringList
// "STRING_VALUE",
// ],
// data: { // SendWhatsAppMessageData
// from: "STRING_VALUE",
// to: "STRING_VALUE",
// pbx: "STRING_VALUE",
// company: "STRING_VALUE",
// message: "STRING_VALUE",
// extension: "STRING_VALUE",
// media: [
// "STRING_VALUE",
// ],
// userId: "STRING_VALUE",
// channelId: "STRING_VALUE",
// messageId: "STRING_VALUE",
// },
// };