Skip to content

Message Sending

We created the easiest way to send messages with Superchats

Final messages can be sent to the contact number, exemple: 5561985290357 or for a group ID, exemple: 1581595404016312391

Send Text

Parameters

Optional SendText Parameters

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
  content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}` // return the message you want to reply no lugar do reply param
};

Simple Send

javascript
let response = await client.sendText(
  "5561985290357",
  "Thank you for using Superchats!!!"
);

Mention Contacts

To mention a contact in a message, pass @551199999999 using the contact number as in the example, and you can use unlimited mentions in a single message

javascript
let response = await client.sendText(
  "5561985290357",
  "Hello @551199999999 how are you? our friend @5511988888888 is missing, huh?"
);

Reply to a Message

To reply to a message, use the ID of the message you want to reply to in the options {reply: msgID} parameter, which is optional.

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
  content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}` // return the message you want to reply no lugar do reply param
};

let response = await client.sendText(
  "5561985290357",
  "Responder à mensagem!!!",
  options
);
Successful return
javascript
{
  session: 'Marketing',
  device: '551152204957',
  status: 200,
  type: 'text',
  isMedia: false,
  id: 'KIZAKIXD9B79E2BC8475',
  to: '556185290357',
  content: { textMessage: { text: 'Thank you for using Superchats!!!' } },
  isgroup: false,
  timestamp: 1714497888
}
Erro return
javascript
{
  session: 'Marketing',
  status: 404,
  type: 'text',
  message: 'message of erro'
}

Send Image

Parâmetros

Optional SendImage Parameters

javascript
const options = {
  caption: "Meu texto", // parameter to send text with image
  reply: "3EB01A690E67", // parameter to reply message
  content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}`, // return the message you want to reply no lugar do reply param
  viewOnce: true, // parameter for sending a single message
};

Send Simple

For image upload, you can use URL, local file path or Base64

javascript
let response = await client.sendImage(
  "5561985290357",
  "https://github.com/orkestral/superchats/raw/main/img/superchats.png"
);

Image with Text

To send an image with text, use the options {caption: 'My text'} parameter, which is optional.

javascript
const options = {
  caption: "My text", 
};

let response = await client.sendImage(
  "5561985290357",
  "https://github.com/orkestral/superchats/raw/main/img/superchats.png",
  options
);

Mention Contacts

To send an image with text and mentions, use the options {caption: 'My text @551199999999'} parameter, which is optional by passing @551199999999 using the contact number as in the example, and you can use unlimited mentions in a single message. image.

javascript
const options = {
  caption:
    '"Hello @551199999999 see this image and share it with @5511988888888 who is missing."',
};

let response = await client.sendImage(
  "5561985290357",
  "https://github.com/orkestral/superchats/raw/main/img/superchats.png",
  options
);

Reply to a Message

To reply to a message with an image, use the ID of the message you want to reply to in the options {reply: msgID} parameter, which is optional.

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
  content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}`, // return the message you want to reply no lugar do reply param
};

let response = await client.sendImage(
  "5561985290357",
  "https://github.com/orkestral/superchats/raw/main/img/superchats.png",
  options
);

Single View Image

To send a single view image, use the options {viewOnce: true} parameter, which is optional.

javascript
const options = {
  viewOnce: true, 
};

let response = await client.sendImage(
  "5561985290357",
  "https://github.com/orkestral/superchats/raw/main/img/superchats.png",
  options
);
Successful return
javascript
{
  session: 'Marketing',
  device: '551152204957',
  status: 200,
  type: 'image',
  isMedia: true,
  id: 'KIZAKIXD5785E3070D74',
  to: '556185290357',
  isgroup: false,
  content: Message {
    imageMessage: ImageMessage {
      interactiveAnnotations: [],
      scanLengths: [],
      url: 'https://mmg.whatsapp.net/v/t62.7118-24/25270615_458846373224929_1269936098490414810_n.enc?ccb=11-4&oh=01_Q5AaIPI9U29lICyS2MULod54ott0rE5IEr8CArdKjrNkY6kA&oe=66589797&_nc_sid=5e03e0&mms3=true',
      mimetype: 'image/jpeg',
      fileSha256: <Buffer 11 ed 0d 21 f2 59 96 9a 65 cf 7e fa c1 57 a1 ee a2 c9 50 b4 0d 09 df df a8 9f e1 44 dd cf a6 a5>,
      fileLength: [Long],
      height: 214,
      width: 818,
      mediaKey: <Buffer 08 15 d8 05 ee 7d 20 91 4e c1 99 11 b3 7d b8 9c 84 74 5d 08 e9 e6 e2 1c b0 e4 0f 14 73 86 6f 91>,
      fileEncSha256: <Buffer 09 a0 66 f5 d3 82 72 e4 20 99 2b 2b c3 4d 0d a9 11 ae 71 18 14 a9 42 44 5e ca cb 41 45 fe de 6a>,
      directPath: '/v/t62.7118-24/25270615_458846373224929_1269936098490414810_n.enc?ccb=11-4&oh=01_Q5AaIPI9U29lICyS2MULod54ott0rE5IEr8CArdKjrNkY6kA&oe=66589797&_nc_sid=5e03e0',
      mediaKeyTimestamp: [Long],
      jpegThumbnail: <Buffer ff d8 ff db 00 43 00 10 0b 0c 0e 0c 0a 10 0e 0d 0e 12 11 10 13 18 28 1a 18 16 16 18 31 23 25 1d 28 3a 33 3d 3c 39 33 38 37 40 48 5c 4e 40 44 57 45 37 ... 294 more bytes>
    }
  },
  participant: '',
  timestamp: 1714498896
}
Erro return
javascript
{
  session: 'Marketing',
  status: 404,
  type: 'image',
  message: 'message of erro'
}

Send Sticker

Parameters

Optional SendSticker Parameters

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
};

Simple Shipping

For sending image stickers, you can use URL, local file path or Base64

javascript
let response = await client.sendSticker(
  "5561985290357",
  "https://static-00.iconduck.com/assets.00/node-js-icon-454x512-nztofx17.png"
);

To reply to a message with an image sticker, use the ID of the message you want to reply to in the options {reply: msgID} parameter, which is optional.

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
   content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}`, // return the message you want to reply no lugar do reply param
};

let response = await client.sendSticker(
  "5561985290357",
  "https://static-00.iconduck.com/assets.00/node-js-icon-454x512-nztofx17.png",
  options
);
Successful return
javascript
{
  session: 'Marketing',
  device: '551152204957',
  status: 200,
  type: 'sticker',
  isMedia: true,
  id: 'KIZAKIXD29528BD80D26',
  to: '556185290357',
  isgroup: false,
  content: Message {
    stickerMessage: StickerMessage {
      url: 'https://mmg.whatsapp.net/v/t62.7118-24/24265743_345128448578659_4510702101938416826_n.enc?ccb=11-4&oh=01_Q5AaIGMrAR78AxXkObTOR3fltIDMqLJUGxjElFnrJllVRii4&oe=6658AFCA&_nc_sid=5e03e0&mms3=true',
      fileSha256: <Buffer ac b2 5f f4 af a4 2e 6d 9e 15 4a e7 58 c0 b3 0f df b6 0b 3f 27 cb 6c d9 55 dd 90 7f e8 92 b8 f7>,
      fileEncSha256: <Buffer 63 9b b7 51 4d 2f 84 2b 11 fc c3 5e 2b bb 8c 4c 56 6b 27 24 30 13 ec 77 c0 01 52 2a 7d a3 d3 70>,
      mediaKey: <Buffer 12 aa cc f7 b7 2f ff 90 e6 e4 cd 71 93 2e 94 65 01 d5 2a 5d cf 31 a4 87 6a 59 65 bf 66 6e c9 f6>,
      mimetype: 'image/webp',
      directPath: '/v/t62.7118-24/24265743_345128448578659_4510702101938416826_n.enc?ccb=11-4&oh=01_Q5AaIGMrAR78AxXkObTOR3fltIDMqLJUGxjElFnrJllVRii4&oe=6658AFCA&_nc_sid=5e03e0',
      fileLength: [Long],
      mediaKeyTimestamp: [Long]
    }
  },
  participant: '',
  timestamp: 1714500124
}
Erro return
javascript
{
  session: 'Marketing',
  status: 404,
  type: 'sticker',
  message: 'message of erro'
}

Send Video

Parameters

Optional SendVideo Parameters

javascript
const options = {
  caption: "My text", // parameter to send text with the image
  reply: "3EB01A690E67", // parameter to reply message
   content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}`, // return the message you want to reply no lugar do reply param
  viewOnce: true, // parameter for sending a single message
  ptv: true, // parameter for sending PTV video message
};

Simple Shipping

For video upload, you can use URL, local file path or Base64

javascript
let response = await client.sendVideo(
  "5561985290357",
  "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4",
  "Text optional"
);

Video with Text

To send a video with text, use the options {caption: 'My text'} parameter, which is optional.

javascript
const options = {
  caption: "Meu texto", 
};

let response = await client.sendVideo(
  "5561985290357",
  "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4",
  options
);

Mention Contacts

To send a video with text and mentions, use the options parameter {caption: 'My text @551199999999'}, which is optional by passing @551199999999 using the contact number as in the example, and you can use unlimited mentions in a single message video.

javascript
const options = {
  caption:
    '"Hello @551199999999 watch this video and share it with @5511988888888 who has been missing."',
};

let response = await client.sendVideo(
  "5561985290357",
  "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4",
  options
);

Reply to a Message

To reply to a message with video, use the ID of the message you want to reply to in the options {reply: msgID} parameter, which is optional.

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
   content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}` // return the message you want to reply no lugar do reply param
};

let response = await client.sendVideo(
  "5561985290357",
  "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4",
  options
);

Single View Video

To send a video with a single view, use the options {viewOnce: true} parameter, which is optional.

javascript
const options = {
  viewOnce: true, 
};

let response = await client.sendVideo(
  "5561985290357",
  "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4",
  options
);

PTV Style Video

To send a PTV style video, use the options {ptv: true} parameter, which is optional.

javascript
const options = {
  ptv: true,
};

let response = await client.sendVideo(
  "5561985290357",
  "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4",
  options
);
Successful return
javascript
{
  session: 'Marketing',
  device: '551152204957',
  status: 200,
  type: 'video',
  isMedia: true,
  id: 'KIZAKIXDC3EC9941831D',
  to: '556185290357',
  isgroup: false,
  content: Message {
    videoMessage: VideoMessage {
      interactiveAnnotations: [],
      url: 'https://mmg.whatsapp.net/v/t62.7161-24/30917007_1016185773462314_1667717879487066254_n.enc?ccb=11-4&oh=01_Q5AaINN4m-LST25bM3ilv2JDdtIDhFTecdLnIxMN98AL69r7&oe=6658B933&_nc_sid=5e03e0&mms3=true',
      mimetype: 'video/mp4',
      fileSha256: <Buffer 75 de 47 ac c8 b9 b5 c6 ef 56 56 6e eb 50 72 af c3 bd e0 a4 ff 4f f4 09 62 a4 b5 33 c1 26 db 46>,
      fileLength: [Long],
      mediaKey: <Buffer c1 3d 61 78 ce da d6 4e 3d 4d f3 27 bd 0a 3b 9f 5c 52 2a 1f 45 98 bf 57 f7 28 f1 f4 80 4d b2 39>,
      fileEncSha256: <Buffer eb 44 32 7a 10 5a e7 4a c2 20 81 1a 8d 32 14 60 06 45 d8 02 24 51 8f ed 6c 2b 1e 6f 8d 57 f7 fe>,
      directPath: '/v/t62.7161-24/30917007_1016185773462314_1667717879487066254_n.enc?ccb=11-4&oh=01_Q5AaINN4m-LST25bM3ilv2JDdtIDhFTecdLnIxMN98AL69r7&oe=6658B933&_nc_sid=5e03e0',
      mediaKeyTimestamp: [Long],
      jpegThumbnail: <Buffer ff d8 ff fe 00 0f 4c 61 76 63 36 30 2e 33 2e 31 30 30 00 ff db 00 43 00 08 04 04 04 04 04 05 05 05 05 05 05 06 06 06 06 06 06 06 06 06 06 06 06 06 07 ... 515 more bytes>
    }
  },
  participant: '',
  timestamp: 1714501077
}
Erro return
javascript
{
  session: 'Marketing',
  status: 404,
  type: 'video',
  message: 'message of erro'
}

Send Audio

Parameters

Optional SendAudio Parameters

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
   content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}` // return the message you want to reply no lugar do reply param
};

Simple Shipping

For sending audio, you can use URL, local file path or Base64

javascript
let response = await client.sendAudio(
  "5561985290357",
  "https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3"
);

Reply to a Message

To reply to a message with audio, use the ID of the message you want to reply to in the options {reply: msgID} parameter, which is optional.

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
   content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}` // return the message you want to reply no lugar do reply param
};
let response = await client.sendAudio(
  "5561985290357",
  "https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3",
  options
);
Successful return
javascript
{
  session: 'Marketing',
  device: '551152204957',
  status: 200,
  type: 'audio',
  isMedia: true,
  id: 'KIZAKIXDD47A012F369B',
  to: '556185290357',
  content: Message {
    audioMessage: AudioMessage {
      url: 'https://mmg.whatsapp.net/v/t62.7114-24/35304887_962160115296962_4043552676958593962_n.enc?ccb=11-4&oh=01_Q5AaILurgXMtkRNbB1v-2NA3TqM3M488f14yCz50KajQaOjE&oe=6658C1ED&_nc_sid=5e03e0&mms3=true',
      mimetype: 'audio/ogg; codecs=opus',
      fileSha256: <Buffer 23 f0 2d b4 39 18 e3 6e 4e 50 14 a8 01 6d 40 a6 24 b6 21 89 1c 9f 2f f9 cc 15 e0 42 93 59 1b 54>,
      fileLength: [Long],
      seconds: 348,
      mediaKey: <Buffer 8d 46 11 b9 f8 fc b9 8f a7 bf cb 7c 45 ad cc 89 9a d5 e2 2e f5 bd 3d 60 1a 23 16 a1 21 3c 07 3f>,
      fileEncSha256: <Buffer 28 2b d4 64 e4 69 5b 64 2f 3a 44 34 95 75 57 2e 53 fa 77 b4 bf 43 ac 83 6a 9a e6 d7 e3 fa a4 34>,
      directPath: '/v/t62.7114-24/35304887_962160115296962_4043552676958593962_n.enc?ccb=11-4&oh=01_Q5AaILurgXMtkRNbB1v-2NA3TqM3M488f14yCz50KajQaOjE&oe=6658C1ED&_nc_sid=5e03e0',
      mediaKeyTimestamp: [Long]
    }
  },
  isgroup: false,
  participant: '',
  timestamp: 1714501517
}
Erro return
javascript
{
  session: 'Marketing',
  status: 404,
  type: 'audio',
  message: 'message of erro'
}

Send Voice Audio

For sending audio and voice, you can use URL, local file path or Base64

javascript
let response = await client.sendVoice(
  "5561985290357",
  "https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3"
);

Reply to a Message

To reply to a message with voice audio, use the ID of the message you want to reply to in the options {reply: msgID} parameter, which is optional.

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
   content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}` // return the message you want to reply no lugar do reply param
};
let response = await client.sendVoice(
  "5561985290357",
  "https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3",
  options
);
Successful return
javascript
{
  session: 'Marketing',
  device: '551152204957',
  status: 200,
  type: 'voice',
  isMedia: true,
  id: 'KIZAKIXDC2BAD5009E75',
  to: '556185290357',
  content: Message {
    audioMessage: AudioMessage {
      url: 'https://mmg.whatsapp.net/v/t62.7114-24/380802574_1008893277568727_4699121474496060274_n.enc?ccb=11-4&oh=01_Q5AaIGzxDb0_UkVc25EZ7RF5UCMYLzVABqenhLQ7JE5t-XPe&oe=66591C18&_nc_sid=5e03e0&mms3=true',
      mimetype: 'audio/ogg; codecs=opus',
      fileSha256: <Buffer 23 f0 2d b4 39 18 e3 6e 4e 50 14 a8 01 6d 40 a6 24 b6 21 89 1c 9f 2f f9 cc 15 e0 42 93 59 1b 54>,
      fileLength: [Long],
      seconds: 348,
      ptt: true,
      mediaKey: <Buffer 2d f8 ce 0e 6f 79 93 ec cb 1c 2d 8f 43 c6 d9 80 87 84 22 b6 a4 30 d8 eb fd 8e d7 4f 3b 4a 01 45>,
      fileEncSha256: <Buffer a8 be 03 fc 71 17 07 3d 79 58 e6 d0 c7 4a b6 22 0f 40 cd 3a fb 5f cd 66 22 f8 56 9f 40 2f a9 a0>,
      directPath: '/v/t62.7114-24/380802574_1008893277568727_4699121474496060274_n.enc?ccb=11-4&oh=01_Q5AaIGzxDb0_UkVc25EZ7RF5UCMYLzVABqenhLQ7JE5t-XPe&oe=66591C18&_nc_sid=5e03e0',
      mediaKeyTimestamp: [Long],
      backgroundArgb: 4281423221
    }
  },
  isgroup: false,
  participant: '',
  timestamp: 1714525078
}
Erro return
javascript
{
  session: 'Marketing',
  status: 404,
  type: 'voice',
  message: 'message of erro'
}

Send Files

Parameters

Optional SendAudio Parameters

javascript
const options = {
  caption: "My text", // parameter to send text with the image
  reply: "3EB01A690E67", // parameter to reply message
   content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}` // return the message you want to reply no lugar do reply param
};

Simple Shipping

For uploading documents, you can use URL, local file path or Base64

javascript
const options = {
  filename: 'Name of File', // parameter to set the name of the file, if the name of the file sent and maintained is not passed
  caption: 'My text', // parameter to reply to message
  reply: '3EB01A690E67', // parameter to reply message
   content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}` // return the message you want to reply no lugar do reply param
}
let response = await client.sendDocument("5561985290357", "https://www.fatecdiadema.com.br/wp-content/uploads/2017/11/unnamed-file-4.pdf");

Document with Text

To send a document with text, use the options {caption: 'My text'} parameter, which is optional.

javascript
const options = {
  caption: "My text", 
};

let response = await client.sendDocument(
  "5561985290357",
  "https://www.fatecdiadema.com.br/wp-content/uploads/2017/11/unnamed-file-4.pdf",
  options
);

Mention Contacts

To send a document with text and mentions, use the options {caption: 'My text @551199999999'} parameter, which is optional by passing @551199999999 using the contact number as in the example, and you can use unlimited mentions in a single message. document.

javascript
const options = {
  caption:
    '"Hello @551199999999 see this file and share it with @5511988888888 who is missing."',
};

let response = await client.sendDocument(
  "5561985290357",
  "https://www.fatecdiadema.com.br/wp-content/uploads/2017/11/unnamed-file-4.pdf",
  options
);

Reply to a Message

To reply to a message with a document, use the ID of the message you want to reply to in the options {reply: msgID} parameter, which is optional.

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
   content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}` // return the message you want to reply no lugar do reply param
};
let response = await client.sendDocument(
  "5561985290357",
  "https://www.fatecdiadema.com.br/wp-content/uploads/2017/11/unnamed-file-4.pdf",
  options
);
Successful return
javascript
{
  session: 'Marketing',
  device: '551152204957',
  status: 200,
  type: 'document',
  isMedia: true,
  id: 'KIZAKIXD8DC3B99FB877',
  to: '556185290357',
  isgroup: false,
  content: Message {
    documentMessage: DocumentMessage {
      url: 'https://mmg.whatsapp.net/v/t62.7119-24/14754199_1494899067762449_5621195488752745182_n.enc?ccb=11-4&oh=01_Q5AaIMUwk2Jb8WU1pT-TxXIIe8PK3b3el-DtNywn3P-IZV2b&oe=66592237&_nc_sid=5e03e0&mms3=true',
      mimetype: 'application/pdf',
      fileSha256: <Buffer 87 1a 72 48 34 ee aa f9 2f 94 9a a6 ca 76 22 69 13 0d 97 0a 80 24 0a 42 1e 27 d7 c6 ca 70 e0 90>,
      fileLength: [Long],
      mediaKey: <Buffer 49 b9 1c d6 6b 0d a7 c7 e7 00 dc 23 fc 36 3a 44 01 d0 cb 25 e7 5b 37 0f 7c 09 dd 73 b2 65 85 ac>,
      fileName: 'unnamed-file-4',
      fileEncSha256: <Buffer 63 75 56 76 c0 41 92 28 c6 14 27 7e 48 0e 62 9a 36 a7 60 61 31 dd 71 47 07 76 10 e3 d2 e8 7f 97>,
      directPath: '/v/t62.7119-24/14754199_1494899067762449_5621195488752745182_n.enc?ccb=11-4&oh=01_Q5AaIMUwk2Jb8WU1pT-TxXIIe8PK3b3el-DtNywn3P-IZV2b&oe=66592237&_nc_sid=5e03e0',
      mediaKeyTimestamp: [Long]
    }
  },
  participant: '',
  timestamp: 1714527193
}
Erro return
javascript
{
  session: 'Marketing',
  status: 404,
  type: 'document',
  message: 'message of erro'
}

Send Location

Parameters

Optional SendLocation Parameters

javascript
const options = {
  caption: "My text", // parameter to send text with location
  address: "My address", // parameter to set address in location
  reply: "3EB01A690E67", // parameter to reply message
   content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}` // return the message you want to reply no lugar do reply param
};

Simple Shipping

javascript
let response = await client.sendLocation(
  "5561985290357",
  -15.8413105,
  -48.0270346
);

Reply to a Message

To reply to a message with location, use the ID of the message you want to reply to in the options {reply: msgID} parameter, which is optional.

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
   content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}` // return the message you want to reply no lugar do reply param
};
let response = await client.sendLocation(
  "5561985290357",
  -15.8413105,
  -48.0270346,
  options
);
Successful return
javascript
{
  session: 'Marketing',
  device: '551152204957',
  status: 200,
  type: 'location',
  isMedia: false,
  id: 'KIZAKIXD422783305D1D',
  to: '556185290357',
  content: Message {
    locationMessage: LocationMessage {
      degreesLatitude: -15.8413105,
      degreesLongitude: -48.0270346
    }
  },
  isgroup: false,
  participant: '',
  timestamp: 1714527924
}
Erro return
javascript
{
  session: 'Marketing',
  status: 404,
  type: 'location',
  message: 'message of erro'
}

Send Contact

Parameters

Optional SendAudio Parameters

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
   content: `{
    "session": "1",
    "device": "556183602797",
    "status": 200,
    "type": "text",
    "isMedia": false,
    "fromMe": true,
    "id": "KIZAKIXDF88539C9CD2F",
    "remoteJid": "5513997939260@s.whatsapp.net",
    "to": "5513997939260",
    "content": {
        "extendedTextMessage": {
            "text": "Teste https://orkestral.io",
            "matchedText": "https://orkestral.io",
            "canonicalUrl": "https://orkestral.io/",
            "description": "SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\nSuperchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide",
            "title": "SuperChats - premium library that control Whatsapp",
            "previewType": "NONE",
            "jpegThumbnail": "",
            "thumbnailDirectPath": "/o1/v/t62.7118-24/f1/m238/up-oil-image-de11320c-4536-477c-b138-c193b3b728ac?ccb=9-4&oh=01_Q5AaICbt0Kmc8dAEoxRlDivYt-u03tsgj1ncPtpF6wvIjrZv&oe=6701BBB1&_nc_sid=000000",
            "thumbnailSha256": "UqQDp7+E/OtwcFvoO5dxSKq4DxROBIjM21Xa55lQBnY=",
            "thumbnailEncSha256": "n92VMsO9yjp9jn9VIc3x/R0a7twSJmO40SBY4cEKKck=",
            "mediaKey": "E3wDc4jAc1VU/bhtb+blClKC+kuueRPa3v5dx74u5QY=",
            "mediaKeyTimestamp": "1725588896",
            "thumbnailHeight": 0,
            "thumbnailWidth": 0
        }
    },
    "isgroup": false,
    "timestamp": 1725588896
}` // return the message you want to reply no lugar do reply param
};

Simple Shipping

javascript
let response = await client.sendContact(
  "5561985290357",
  "Name of Contact",
  "15815954040"
);

Reply to a Message

To reply to a message with a contact, use the ID of the message you want to reply to in the options {reply: msgID} parameter, which is optional.

javascript
const options = {
  reply: "3EB01A690E67", // parameter to reply message
};
let response = await client.sendContact(
  "5561985290357",
  "Contact name",
  "15815954040",
  options
);
Successful return
javascript
{
  session: 'Marketing',
  device: '551152204957',
  status: 200,
  type: 'contact',
  isMedia: false,
  id: 'KIZAKIXD805ADD351709',
  to: '556185290357',
  content: Message {
    contactMessage: ContactMessage {
      displayName: 'Nome do Contato',
      vcard: 'BEGIN:VCARD\n' +
        'VERSION:3.0\n' +
        'N:Nome do Contato\n' +
        'FN:Nome do Contato\n' +
        'ORG:Nome do Contato;\n' +
        'TEL;type=CELL;type=VOICE;waid=15815954040:15815954040\n' +
        'END:VCARD'
    }
  },
  isgroup: false,
  timestamp: 1714528490
}
Erro return
javascript
{
  session: 'Marketing',
  status: 404,
  type: 'contact',
  message: 'message of erro'
}

Send List

Parameters

Optional SendList Parameters

javascript
const options = {
  titleBtn: "My title", // parameter to set title to the menu
  description: "Description", // parameter to set description to the menu
  footerBtn: "Footer", // parameter to set footer to menu
};

Simple Shipping

javascript
const sections = [
  {
    title: "Bovine",
    rows: [
      { title: "Fraudinha", rowId: "carnes1" },
      { title: "Alcatra", rowId: "meats2", description: "Carne boa" },
    ],
  },
  {
    title: "Swine",
    rows: [
      { title: "Costelinha", rowId: "meats3" },
      {
        title: "Picanha Suina",
        rowId: "meats4",
        description: "Good meat",
      },
    ],
  },
];

const options = {
  titleBtn: "My title",
  description: "Description",
  footerBtn: "Footer",
};
// Contact number, button name, section array, options
let response = await client.sendList(
  "5561985290357",
  "Choose Meat",
  sections,
  options
);
Successful return
javascript
{
  session: 'Marketing',
  device: '551152204957',
  status: 200,
  type: 'list',
  isMedia: false,
  id: 'KIZAKIXD371F228128C5',
  to: '556185290357',
  content: Message {
    listMessage: ListMessage {
      sections: [Array],
      title: 'My title',
      description: 'Description',
      buttonText: 'Choose Meat',
      listType: 2,
      footerText: 'Footer'
    }
  },
  isgroup: false,
  timestamp: 1714532502
}
Erro return
javascript
{
  session: 'Marketing',
  status: 404,
  type: 'list',
  message: 'message of erro'
}

Send Reaction

To react to a message, you can use any Emoji

javascript
// Contact number, Emoji, message id
let response = await client.sendReaction("5561985290357", "👍", "3EB01A690E67");
Successful return
javascript
{
  session: 'Marketing',
  device: '551152204957',
  status: 200,
  type: 'text',
  isMedia: false,
  id: 'KIZAKIXDCE23E3470B82',
  to: '556185290357',
  content: Message {
    reactionMessage: ReactionMessage {
      key: [MessageKey],
      text: '👍',
      senderTimestampMs: [Long]
    }
  },
  isgroup: false,
  timestamp: 1714533625
}
Error return
javascript
{
  session: 'Marketing',
  status: 404,
  type: 'reaction',
  message: 'message of error'
}

All rights reserved to Orkestral LLC