{"id":14987011,"url":"https://github.com/orkestral/super","last_synced_at":"2025-04-12T23:33:37.006Z","repository":{"id":40638504,"uuid":"411132512","full_name":"orkestral/super","owner":"orkestral","description":"SuperChats is a premium library with unique features that control Whatsapp functions. With Superchats you can build service bots, multiservice chats or any system that uses whatsapp","archived":false,"fork":false,"pushed_at":"2025-03-14T13:32:01.000Z","size":778,"stargazers_count":240,"open_issues_count":5,"forks_count":37,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-12T23:33:28.709Z","etag":null,"topics":["chat","chat-application","chatbot","multidevice","venom","venom-bot","whatsapp","whatsapp-api","whatsapp-beta","whatsapp-web"],"latest_commit_sha":null,"homepage":"https://orkestral.io","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orkestral.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-28T04:07:19.000Z","updated_at":"2025-04-11T17:20:21.000Z","dependencies_parsed_at":"2023-12-12T03:26:17.125Z","dependency_job_id":"1baa16ad-abc4-48df-be38-1301acf991ac","html_url":"https://github.com/orkestral/super","commit_stats":{"total_commits":158,"total_committers":3,"mean_commits":"52.666666666666664","dds":"0.28481012658227844","last_synced_commit":"0359760d01977720ec25549d893dd16439699afd"},"previous_names":["orkestral/super","orkestral/superchats"],"tags_count":69,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orkestral%2Fsuper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orkestral%2Fsuper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orkestral%2Fsuper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orkestral%2Fsuper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orkestral","download_url":"https://codeload.github.com/orkestral/super/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647259,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat","chat-application","chatbot","multidevice","venom","venom-bot","whatsapp","whatsapp-api","whatsapp-beta","whatsapp-web"],"created_at":"2024-09-24T14:13:57.024Z","updated_at":"2025-04-12T23:33:36.977Z","avatar_url":"https://github.com/orkestral.png","language":null,"readme":"# \u003ca href='https://github.com/orkestral/superchats/'\u003e\u003cimg src='./img/superchats.png' height='60' alt='SuperChats' aria-label='https://github.com/orkestral/superchats/' /\u003e\u003c/a\u003e\n \u003ca href='https://github.com/orkestral/superchats/'\u003e\nAccess SuperChats git and leave your star\u003c/a\u003e \u003cbr\u003e  \u003cbr\u003e\n\u003cb\u003eSuperChats\u003c/b\u003e is a premium library with unique features that control Whatsapp functions with socket.\nWith Superchats you can build service bots, multiservice chats or any system that uses Whatsapp\n\n\u003cb\u003eSuperchats\u003c/b\u003e is a premium version of \u003ca target=\"_blank\" href='https://github.com/orkestral/venom'\u003eVenom\u003c/a\u003e, with exclusive features and support for companies and developers worldwide\n\n## Buy a license\n\nThe value of the license is $50 monthly dollars, to acquire contact in whatsapp by clicking on the image below !!\n\n\u003ca target=\"_blank\" href=\"https://web.whatsapp.com/send?phone=5561985290357\u0026text=I%20want%20to%20buy%201%20license\" target=\"_blank\"\u003e\u003cimg title=\"whatzapp\" height=\"100\" width=\"375\" src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/f/f7/WhatsApp_logo.svg/2000px-WhatsApp_logo.svg.png\"\u003e\u003c/a\u003e\n\n## Quickstart\n\nRun the following command to ensure you have SuperChats installed:\n\n```bash\n$ npm install superchats\n```\n\nor using yarn:\n\n```bash\n$ yarn add superchats\n```\n\n## Documentations\n\n- \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n- \u003ca href=\"#multiples-sessions\"\u003eMultiples Sessions\u003c/a\u003e\n- \u003ca href=\"#optional-parameters\"\u003eOptional Parameters\u003c/a\u003e\n- \u003ca href=\"#download-and-save-files\"\u003eDownload and Save Files \u003c/a\u003e\n- \u003ca href=\"#disconnect-functions\"\u003eDisconnect Functions \u003c/a\u003e\n- \u003ca href=\"#message-sending-functions\"\u003eMessage Sending Functions \u003c/a\u003e\n  - \u003ca href=\"#send-message-text\"\u003eSend Text \u003c/a\u003e\n  - \u003ca href=\"#send-message-image\"\u003eSend Image \u003c/a\u003e\n  - \u003ca href=\"#send-message-sticker\"\u003eSend Sticker \u003c/a\u003e\n  - \u003ca href=\"#send-message-video\"\u003eSend Video \u003c/a\u003e\n  - \u003ca href=\"#send-message-audio\"\u003eSend Audio \u003c/a\u003e\n  - \u003ca href=\"#send-message-audio-voice\"\u003eSend Voice \u003c/a\u003e\n  - \u003ca href=\"#send-message-document\"\u003eSend Document \u003c/a\u003e\n  - \u003ca href=\"#send-message-location\"\u003eSend Location \u003c/a\u003e\n  - \u003ca href=\"#send-message-contact\"\u003eSend Contact \u003c/a\u003e\n  - \u003ca href=\"#send-message-link\"\u003eSend Link \u003c/a\u003e\n  - \u003ca href=\"#send-message-buttons\"\u003eSend Buttons \u003c/a\u003e\n  - \u003ca href=\"#send-message-list\"\u003eSend List \u003c/a\u003e\n- \u003ca href=\"#get-all-contacts\"\u003eGet All Contacts \u003c/a\u003e\n- \u003ca href=\"#delete-message\"\u003eDelete Message \u003c/a\u003e\n- \u003ca href=\"#forwarding-message\"\u003eForwarding Message \u003c/a\u003e\n- \u003ca href=\"#mute-chat\"\u003eMute Chat \u003c/a\u003e\n- \u003ca href=\"#get-chats\"\u003eGet Chats \u003c/a\u003e\n- \u003ca href=\"#read-chat-messages\"\u003eRead Chat Messages\u003c/a\u003e\n- \u003ca href=\"#get-block-list\"\u003eGet Block List \u003c/a\u003e\n- \u003ca href=\"#archive-chat\"\u003eArchive Chat \u003c/a\u003e\n- \u003ca href=\"#delete-chat\"\u003eDelete Chat \u003c/a\u003e\n- \u003ca href=\"#pin-chat\"\u003ePin Chat \u003c/a\u003e\n- \u003ca href=\"#block-contact\"\u003eBlock Contact \u003c/a\u003e\n- \u003ca href=\"#get-profile-status\"\u003eGet Profile Status \u003c/a\u003e\n- \u003ca href=\"#get-picture\"\u003eGet Picture \u003c/a\u003e\n- \u003ca href=\"#set-picture\"\u003eSet Picture \u003c/a\u003e\n- \u003ca href=\"#get-number-profile\"\u003eGet Number Profile \u003c/a\u003e\n- \u003ca href=\"#groups-functions\"\u003eGroups Functions \u003c/a\u003e\n  - \u003ca href=\"#create-group\"\u003eCreate Group\u003c/a\u003e\n  - \u003ca href=\"#add-participants-group\"\u003eAdd Participants Group\u003c/a\u003e\n  - \u003ca href=\"#add=admins-group\"\u003eAdd Admins Group\u003c/a\u003e\n  - \u003ca href=\"#change-name-of-group\"\u003eChange Name of Group\u003c/a\u003e\n  - \u003ca href=\"#change-name-of-group\"\u003eChange Description of Group\u003c/a\u003e\n  - \u003ca href=\"#join-group\"\u003eJoin Group\u003c/a\u003e\n  - \u003ca href=\"#leave-group\"\u003eLeave Group\u003c/a\u003e\n  - \u003ca href=\"#get-group-link\"\u003eGet Group Link\u003c/a\u003e\n  - \u003ca href=\"#revoke-group-link\"\u003eRevoke Group Link\u003c/a\u003e\n  - \u003ca href=\"#info-group\"\u003eInfo Group\u003c/a\u003e\n  - \u003ca href=\"#set-group-settings\"\u003eSet Group Settings\u003c/a\u003e\n  - \u003ca href=\"#get-groups-list\"\u003eGet Groups List\u003c/a\u003e\n- \u003ca href=\"#get-host-device\"\u003eGet Host Device\u003c/a\u003e\n- \u003ca href=\"#chat-messages-functions\"\u003eChat Messages Functions\u003c/a\u003e\n- \u003ca href=\"#update-presence\"\u003eUpdate Presence\u003c/a\u003e\n- \u003ca href=\"#send-messages-for-status\"\u003eSend Messages for Status\u003c/a\u003e\n- \u003ca href=\"#observation-events\"\u003eObservation Events\u003c/a\u003e\n\n## Getting Started\n\n```javascript\nconst superchats = require(\"superchats\");\n\nasync function start(){\nlet client = await superchats.create({\n  session: \"Marketing\",\n  license: \"asjdh-efddff734-sdsdf834-233272\",\n  nodata: true,\n  logQr: false,\n  qr: true,\n  code: false,\n  statusFind: async (status) =\u003e {\n    console.log(status)\n  },\n  qrcode: async (session, base64Img, asciiQR, urlCode) =\u003e {\n  console.log(asciiQR)\n  },\n  onMessage: async (message) =\u003e {\n     if ((message.type == \"text\" || message.subtype == 'text')  \u0026\u0026 message.content == \"hi\") {\n       await client.sendText(message.from, \"Let's GO Superchats\");\n     }\n   }  // Receive an event all the time you receive a message from some contact\n})\n\nreturn client;\n\n}\n\n(async function(){\n  let client = await start();\n    let response = await client.sendText('0000000000000', 'Thanks for using Superchats!!!')\n    console.log(response)\n})()\n```\n\n## Multiples Sessions\n\nAfter executing create() function, **Superchats** will create an instance of whatsapp. If you are not logged in, it will print a QR code in the terminal. Scan it with your phone and you are ready to go!\n**Superchats** will remember the session so there is no need to authenticate everytime.\nMultiples sessions can be created at the same time by pasing a session name to create() function:\n\n```javascript\n// Init sales whatsapp bot\nsuperchats.create({session:'sales', license: \"asjdh-efddff734-sdsdf834-233272\"}).then((salesClient) =\u003e {...});\n\n// Init support whatsapp bot\nssuperchats.create({session:'support', license: \"asjdh-efddff734-sdsdf834-233272\"}).then((supportClient) =\u003e {...});\n```\n\n## Optional Parameters\n\nOptional parameters are started along with the connection as events of **QRCODE and CONNECTION STATUS**, plus extra options\n\n```javascript\nconst superchats = require(\"superchats\");\n\nsuperchats.create({\n    session: \"Marketing\",\n    license: \"asjdh-efddff734-sdsdf834-233272\", // Valid license to use Superchats\n    welcomeScreen: true, // Show or hide welcome in terminal\n    retries: 3, // Number of connection attempts,\n    nodata true, // It doesn't get the entire history of the device (default = true) \n    logQr: true, // (Default is true) Logs QR automatically in terminal\n    qr: true, // If marked true uses the QR code instead of the pairing code\n    code: false, // if marked true, uses the pairing code instead of the QR\n    phoneNumber: \"556185290357\", // Number for pairing with WhatsApp alternative to QR\n    qrcode: (sessionId, base64QR, asciiQR, urlCode) =\u003e {\n    console.log(\"sessionId: \" + sessionId)\n    console.log(\"base64 image of qrcode: \" + base64QR);\n    console.log(\"Terminal image of qrcode in caracter ascii: \" + asciiQR);\n    console.log(\"Terminal string hash of qrcode: \" + urlCode);\n     },\n    pairing: (sessionId, code){\n    console.log(\"Session name: \" + sessionId)\n    console.log(\"Pairing code: \" + code)\n     }, \n    statusFind: (statusSession) =\u003e {\n    console.log(\"Status Session: \", statusSession);\n     },\n  onMessage: (event) =\u003e { // Receive an event all the time you receive a message from some contact\n     console.log(event)\n     },\n  onMessageFull: (event) =\u003e { // Receive an event all the time you receive a message complete no filters direct of socket do whatsapp\n     console.log(event)\n     },\n  onAck: (event) =\u003e {    // Receive an event every time you send a message to some contact with the States of: failed, pending, sent, received or read\n     console.log(event)\n     },\n  onPresence: (event) =\u003e { // Receive an event every time a contact is: typing, recording, online or offline with you\n     console.log(event)\n     },\n  onGroups: (event) =\u003e { // Receive events all time the name of a group, configurations are changed\n     console.log(event)\n     },\n  onParticipants: (event) =\u003e { // Receive events about group participants\n     console.log(event)\n     },\n  onDelete: (event) =\u003e { // Receive events every time a message is deleted\n     console.log(event)\n     }\n  })\n```\n## Callback StatusFind\n\nGet connection feedback by following codes:\n\n| Status                  | Condition                                                                                                                                                      |\n| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `isLogged`              | When the client already has a valid token and will not need to read the qrcode again                                                                                                              |\n| `notLogged`             | When the client does not have a valid token and needs to read the qr code again                           |                                      |\n| `isDisconnected`    | The client has disconnected or has been disconnected                                                                                                                           |\n| `isLogout`           | The client has disconnected and removed the token from the device                                                                                                                              |\n| `isConnected`        | The client has successfully connected list                                                                                                                       |\n| `serverDisconnected`        | Disconnected for whatsapp socket server                                                                                                                  |\n| `isReconnected`        | notifies that it is connected so that you can check if it has been successfully connected                                                                                                                  |\n\n## Download and Save Files\n\nDownload and save any message file with the functions below\n\n```javascript\nlet client = await superchats.create({\n  session: \"Marketing\",\n  license: \"asjdh-efddff734-sdsdf834-233272\",\n  onMessage: async (message) =\u003e {\n      if (message.isMedia === true) {\n      \n    //retrieve the file buffer for a given message\n    // Attention, use a delay of at least 2 seconds\n\n    const buffer = await client.decryptByIdFile(message.from, message.id);\n\n    // Save the message file in the project's root or in a directory: './diretory/filename' don't forget to create the directory\n    // Attention, use a delay of at least 2 seconds\n    const saveFile = await client.decryptByIdFileSave(message.from, message.id, filename);\n   \n  }\n   }  // Receive an event all the time you receive a message from some contact\n})\n\n```\n\n##### Return of decryptFile\n```javascript\n{\n    session: 'Marketing',\n    status: 200,\n    type: \"decrypt-by-id-file\",\n    buffer: {\n      type: \"Buffer\",\n      data: [137,80,78,71,13,10,26,10,0,0,0,13,73,72,68]\n    }\n}\n```\n##### Return of decryptFileSave\n```javascript\n{\n    session: 'Marketing',\n    status: 404,\n    type: \"decrypt-by-id-file-save\",\n    response: \"./files/teste4.mp4\"\n}\n```\n## Disconnect Functions\n\n\u003e Disconnect Functions\n\n```javascript\n   client.close()\n```\n```javascript\n   client.logout()\n```\n\n## Message Sending Functions\n\nWe created the easiest way to send messages with **Superchats**\n\n\u003e Sending messages can be sent to the contact's number, example: **5561981590153** or to a group ID, example: **15815954040-1631239154**\n\n### Send Message Text\n\n```javascript\nlet response = await client.sendText(\"5561981590153\", \"Thanks for using Superchats!!!\");\n\n```\n\n\u003e To reply to a message, use the id of the message you want to reply to in the last parameter, which is optional.\n\n```javascript\nlet response = await client.sendText(\"5561981590153\", \"Reply Message!!!\", '3EB01A690E67');\n```\n\n##### Return with success\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'text',\n  id: '3EB01A690E67',\n  to: '556181590153',\n  content: 'Thanks for using Superchats!!!',\n  isgroup: false,\n  timestamp: 1633101992\n}\n```\n##### Return with erro\n\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'text',\n  message: 'message of erro'\n}\n```\n### Send Message Image\n\n\u003e For image submission, you can use URL or the local file path\n\n```javascript\nlet response = await client.sendImage(\"5561981590153\", \"https://github.com/orkestral/superchats/raw/main/img/superchats.png\", \"Text optional\");\n\n```\n\n\u003e To reply to a message with image, use the id of the message you want to reply to in the last parameter, which is optional.\n\n```javascript\nlet response = await client.sendImage(\"5561981590153\", \"https://github.com/orkestral/superchats/raw/main/img/superchats.png\", \"Reply with image\", '3EB01A690E67');\n```\n\n##### Return with success\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'image',\n  id: '3EB0FF4E2532',\n  to: '556181590153',\n  isgroup: false,\n  file: {\n    url: 'https://mmg.whatsapp.net/d/f/AmkmMjj4ZqieB6bDxS-Trox10ldAe5aIUZ5uQLutyKL8.enc',\n    caption: 'Text optional',\n    mimetype: 'image/jpeg',\n    fileSha256: \u003cBuffer 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\u003e,\n    fileLength: Long { low: 15183, high: 0, unsigned: true },\n    height: 0,\n    width: 0,\n    mediaKey: \u003cBuffer 17 0e ba 4b e6 81 69 eb 2b 30 28 59 5f a1 f4 42 7d fa 18 61 8a de 74 28 09 fc 92 79 7e 3d cc d4\u003e,\n    fileEncSha256: \u003cBuffer fe 62 a7 a4 d9 c3 ca 84 44 51 26 08 4c 7f fe 0a b1 13 f0 ad b9 9a ba 7e de a4 83 35 07 b0 5a 3e\u003e,\n    directPath: '',\n    thumbnail: \u003cBuffer \u003e\n  },\n  participant: '',\n  timestamp: 1633106913\n}\n\n```\n##### Return with erro\n\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'image',\n  message: 'message of erro'\n}\n```\n\n### Send Message Sticker\n\n\u003e For image sticker submission, you can use URL or the local file path\n\n```javascript\nlet response = await client.sendSticker(\"5561981590153\", \"https://static-00.iconduck.com/assets.00/node-js-icon-454x512-nztofx17.png\");\n\n```\n\n\u003e To reply to a message with image sticker, use the id of the message you want to reply to in the last parameter, which is optional.\n\n```javascript\nlet response = await client.sendSticker(\"5561981590153\", \"https://static-00.iconduck.com/assets.00/node-js-icon-454x512-nztofx17.png\", '3EB01A690E67');\n```\n\n##### Return with success\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'sticker',\n  id: '3EB07B2F281B',\n  to: '556181590153',\n  isgroup: false,\n  file: {\n    url: 'https://mmg.whatsapp.net/d/f/Ak39fUdprDRnKalZbWWyepoMbvNBlEOgIqZzY7GLEBil.enc',\n    mimetype: 'image/webp',\n    fileSha256: \u003cBuffer 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\u003e,\n    fileLength: Long { low: 23001, high: 0, unsigned: true },\n    mediaKey: \u003cBuffer 6e 96 87 f9 90 1e f5 ae cb 8a c6 9d 95 92 86 ca d3 1a 2a e1 d6 f1 1f f6 5e c3 56 1f 8f 14 1b 08\u003e,\n    fileEncSha256: \u003cBuffer 69 88 d6 36 1c 8b 5f 02 a1 8f e1 6b b2 41 3d da 68 77 b8 8b fd df f0 d0 73 5b bf 2c 84 ee 7e b4\u003e,\n    directPath: ''\n  },\n  participant: '',\n  timestamp: 1633129024\n}\n```\n##### Return with erro\n\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'sticker',\n  message: 'message of erro'\n}\n```\n\n### Send Message Video\n\u003e For video submission, you can use URL or the local file path\n\n```javascript\nlet response = await client.sendVideo(\"5561981590153\", \"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4\", \"Text optional\");\n\n```\n\n\u003e To reply to a message with video, use the id of the message you want to reply to in the last parameter, which is optional.\n\n```javascript\nlet response = await client.sendVideo(\"5561981590153\", \"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4\", \"Reply with video\", '3EB01A690E67');\n```\n\n##### Return with success\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'video',\n  id: '3EB0612BED9B',\n  to: '556181590153',\n  isgroup: false,\n  file: {\n    url: 'https://mmg.whatsapp.net/d/f/AnrExTInFHkr446WcJoVnbHhhb1Tdmg8ort6g1SweEvS.enc',\n    caption: 'Text optional',\n    mimetype: 'video/mp4',\n    fileSha256: \u003cBuffer 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\u003e,\n    fileLength: Long { low: 2252313, high: 0, unsigned: true },\n    mediaKey: \u003cBuffer f7 91 19 c6 62 30 93 cc cb 83 b0 5a 20 f7 1c 5b 62 a6 36 fc 93 53 87 df 14 69 a6 14 db 9c ff 5e\u003e,\n    fileEncSha256: \u003cBuffer 49 d9 c9 e4 61 96 36 fc 7e ae 83 a4 da a1 70 5e d2 d5 f4 f1 74 15 52 26 84 8f f1 cb f4 54 82 3f\u003e,\n    directPath: '',\n    thumbnail: \u003cBuffer \u003e\n  },\n  participant: '',\n  timestamp: 1633108332\n}\n\n```\n##### Return with erro\n\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'video',\n  message: 'message of erro'\n}\n```\n\n### Send Message Audio\n\u003e For audio submission, you can use URL or the local file path\n\n```javascript\nlet response = await client.sendAudio(\"5561981590153\", \"https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3\");\n\n```\n\n\u003e To reply to a message with audio, use the id of the message you want to reply to in the last parameter, which is optional.\n\n```javascript\nlet response = await client.sendAudio(\"5561981590153\", \"https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3\", '3EB01A690E67');\n```\n\n##### Return with success\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'audio',\n  id: '3EB072B039F6',\n  to: '556181590153',\n  content: '',\n  isgroup: false,\n  file: {\n    url: 'https://mmg.whatsapp.net/d/f/AjwRfBCBZ1XgeSLtdVTr96lMJO5CtZtjCi0HpNjEctDW.enc',\n    mimetype: 'audio/ogg; codecs=opus',\n    fileSha256: \u003cBuffer fa 28 20 25 6f 2c d3 f2 df 03 fa 24 7d 7b 01 e7 9d 3f e7 94 34 4a ad ce a0 8c ee 06 bc ce 3c 94\u003e,\n    fileLength: Long { low: 764176, high: 0, unsigned: true },\n    seconds: 27,\n    mediaKey: \u003cBuffer ad f9 19 91 76 08 28 59 63 b2 be 43 13 8d 68 5b d3 90 e7 93 6d 32 29 5e e8 b5 b9 cb 37 76 d6 27\u003e,\n    fileEncSha256: \u003cBuffer ab d4 0e 48 ca 4c 1e 47 86 02 50 3f 0d 87 aa 7f a7 82 ac ff eb 8d 1f ac f1 f8 6d da 36 1e ba e4\u003e,\n    directPath: ''\n  },\n  participant: '',\n  timestamp: 1633111077\n}\n\n```\n##### Return with erro\n\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'audio',\n  message: 'message of erro'\n}\n```\n### Send Message Audio Voice\n\u003e For audio voice submission, you can use URL or the local file path\n\n```javascript\nlet response = await client.sendVoice(\"5561981590153\", \"https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3\");\n\n```\n\n\u003e To reply to a message with audio voice, use the id of the message you want to reply to in the last parameter, which is optional.\n\n```javascript\nlet response = await client.sendVoice(\"5561981590153\", \"https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3\", '3EB01A690E67');\n```\n\n##### Return with success\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'voice',\n  id: '3EB072B039F6',\n  to: '556181590153',\n  content: '',\n  isgroup: false,\n  file: {\n    url: 'https://mmg.whatsapp.net/d/f/AjwRfBCBZ1XgeSLtdVTr96lMJO5CtZtjCi0HpNjEctDW.enc',\n    mimetype: 'audio/ogg; codecs=opus',\n    fileSha256: \u003cBuffer fa 28 20 25 6f 2c d3 f2 df 03 fa 24 7d 7b 01 e7 9d 3f e7 94 34 4a ad ce a0 8c ee 06 bc ce 3c 94\u003e,\n    fileLength: Long { low: 764176, high: 0, unsigned: true },\n    seconds: 27,\n    mediaKey: \u003cBuffer ad f9 19 91 76 08 28 59 63 b2 be 43 13 8d 68 5b d3 90 e7 93 6d 32 29 5e e8 b5 b9 cb 37 76 d6 27\u003e,\n    fileEncSha256: \u003cBuffer ab d4 0e 48 ca 4c 1e 47 86 02 50 3f 0d 87 aa 7f a7 82 ac ff eb 8d 1f ac f1 f8 6d da 36 1e ba e4\u003e,\n    directPath: ''\n  },\n  participant: '',\n  timestamp: 1633111077\n}\n\n```\n##### Return with erro\n\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'voice',\n  message: 'message of erro'\n}\n```\n\n### Send Message Document\n\u003e For document submission, you can use URL or the local file path\n\n```javascript\nlet response = await client.sendDocument(\"5561981590153\", \"http://www.orimi.com/pdf-test.pdf\", \"Filename Optional\");\n\n```\n\u003e To reply to a message with document, use the id of the message you want to reply to in the last parameter, which is optional.\n\n```javascript\nlet response = await client.sendDocument(\"5561981590153\", \"http://www.orimi.com/pdf-test.pdf\", \"Filename Optional\", '3EB01A690E67');\n```\n##### Return with success\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'document',\n  id: '3EB07C8C333C',\n  to: '556181590153',\n  isgroup: false,\n  file: {\n    url: 'https://mmg.whatsapp.net/d/f/ArJfVUhnzdW7qcBk8-T-mzRWsfMN6k_WOS81td_xJs6E.enc',\n    mimetype: 'application/pdf',\n    filename: 'Filename Optional',\n    fileSha256: \u003cBuffer f6 ed cd 8a 1b 4f 7c b8 54 86 d0 c6 77 7f 91 74 ea db c4 d1 d0 d9 e5 ae ba 71 32 f3 0b 34 bc 3e\u003e,\n    fileLength: Long { low: 20597, high: 0, unsigned: true },\n    mediaKey: \u003cBuffer 1b 7d 59 ce fa 4b 3f 35 14 ca 36 1b bd ba f7 c7 ed 6a f7 3d ea c1 04 b0 7c a1 6b d4 4a ab 33 40\u003e,\n    fileEncSha256: \u003cBuffer 37 db ac 7a aa f5 c2 aa 13 c6 ec 18 9f 32 d7 5b 8a b3 0d fc 50 4f 9c ea aa 2f 8c ed 20 c9 f5 b0\u003e,\n    directPath: '',\n    thumbnail: \u003cBuffer \u003e\n  },\n  participant: '',\n  timestamp: 1633121433\n}\n```\n##### Return with erro\n\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'document',\n  message: 'message of erro'\n}\n```\n### Send Message Location\n\n```javascript\nlet response = await client.sendLocation(\"5561981590153\", -15.8413105, -48.0270346, 'title optional', 'address optional');\n\n```\n\u003e To reply to a message with location, use the id of the message you want to reply to in the last parameter, which is optional.\n\n```javascript\nlet response = await client.sendLocation(\"5561981590153\", -15.8413105, -48.0270346, 'title optional', 'address optional', '3EB01A690E67');\n```\n##### Return with success\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'location',\n  id: '3EB01A3D9A34',\n  to: '556181590153',\n  name: 'title optional',\n  address: 'address optional',\n  url: '',\n  thumbnail: \u003cBuffer \u003e,\n  latitude: -15.8413105,\n  longitude: -48.0270346,\n  isgroup: false,\n  participant: '',\n  timestamp: 1633122748\n}\n```\n##### Return with erro\n\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'location',\n  message: 'message of erro'\n}\n```\n### Send Message Contact\n\n```javascript\nlet response = await client.sendContact(\"5561981590153\",'Name of Contact', '15815954040');\n\n```\n\u003e To reply to a message with contact, use the id of the message you want to reply to in the last parameter, which is optional.\n\n```javascript\nlet response = await client.sendContact(\"5561981590153\",'Name of Contact', '15815954040', '3EB01A690E67');\n```\n##### Return with success\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'contact',\n  id: '3EB00AFB1F60',\n  to: '556181590153',\n  display: 'Name of Contact',\n  vcard: 'BEGIN:VCARD\\n' +\n    'VERSION:3.0\\n' +\n    'FN:Name of Contact\\n' +\n    'TEL;type=CELL;type=VOICE;waid=15815954040:+15815954040\\n' +\n    'END:VCARD',\n  isgroup: false,\n  timestamp: 1633128149\n}\n```\n##### Return with erro\n\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'contact',\n  message: 'message of erro'\n}\n```\n### Send Message Link\n\n```javascript\n  let response = await client.sendLink(\"5561981590153\", \"https://music.youtube.com/watch?v=mqA5iMLsME8\u0026feature=share\", 'Description optional');\n\n```\n\u003e To reply to a message with link, use the id of the message you want to reply to in the last parameter, which is optional.\n\n```javascript\n  let response = await client.sendLink(\"5561981590153\", \"https://music.youtube.com/watch?v=mqA5iMLsME8\u0026feature=share\", 'Description optional', '3EB01A690E67');\n```\n##### Return with success\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'link',\n  id: '3EB0746BE9A9',\n  to: '556181590153',\n  content: 'https://music.youtube.com/watch?v=mqA5iMLsME8\u0026feature=share\\n' +\n    'Description optional',\n  isgroup: false,\n  timestamp: 1633130029\n}\n```\n##### Return with erro\n\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'link',\n  message: 'message of erro'\n}\n```\n\n### Send Message List\n\u003e Attention! This function does not work if connected to a WhatsApp Business account\n\n```javascript\n\n   const sections = [\n        {\n          title: \"Bovina\",\n          rows: [\n            { title: \"Fraudinha\", rowId: \"carnes1\" },\n            { title: \"Alcatra\", rowId: \"carnes2\", description: \"Carne boa\" },\n          ],\n        },\n        {\n          title: \"Suina\",\n          rows: [\n            { title: \"Costelinha\", rowId: \"carnes3\" },\n            {\n              title: \"Picanha Suina\",\n              rowId: \"carnes4\",\n              description: \"Carne boa\",\n            },\n          ],\n        },\n      ];\n  //number of contact, name of button, sections array, title, description: optional, footer: optional\n  let response = await const response = await client.sendList(\n        \"5561981590153\",\n        \"Escolha a Carne\",\n        sections,\n        \"Escolha 1 tipo de carne\",\n        \"\", //Description opcional\n        \"Qual o tipo de carne vai na sua refeição?\"\n      );\n\n```\n\u003e To reply to a message with buttons, use the id of the message you want to reply to in the last parameter, which is optional.\n\n```javascript\n  //number of contact, name of button, sections array, title, description: optional, footer: optional,  id message for reply\n  let response = await const response = await client.sendList(\n        \"5561981590153\",\n        \"Escolha a Carne\",\n        sections,\n        \"Escolha 1 tipo de carne\",\n        \"\", //Description opcional\n        \"Qual o tipo de carne vai na sua refeição?\",\n        \"3EB01A690E67\"\n      );\n```\n##### Return with success\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'list',\n  id: '3EB0F92B3F1D',\n  to: '556181590153',\n  description: 'Description optional',\n  btnName: 'Name of Button',\n  sections: [ Section { rows: [Array], title: 'Name of section' } ],\n  isgroup: false,\n  timestamp: 1633143340\n}\n```\n##### Return with erro\n\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'list',\n  message: 'message of erro'\n}\n```\n\n## Delete Message\n\n\u003e Delete messages in chats only for you or for all\n\nDelete message only for you\n\n```javascript\n//number of chat, id of message\nlet response = await client.deleteMessageMe(\"5561981590153\", \"3EB071B7776A\")\n\n```\nDelete Message to everyone on chat\n\n```javascript\n//number of chat, id of message\nlet response = await client.deleteMessageAll(\"5561981590153\", \"3EB071B7776A\")\n\n```\n\nReturn with success \n```javascript\n{ \n session: 'Marketing',\n status: 200 \n type: 'delete-chat-me'\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'delete-chat-me',\n  message: 'message of erro'\n}\n```\n## Forwarding Message\n\n\u003e Message forwarding for any contact\n\n\n\n\n```javascript\n//number of chat, id of message, number chat for send\nlet response = await client.forwardMessage(\"5561981590153\", \"3EB042FA6555\", \"15815954040\")\n\n```\n\nReturn with success \n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'forwarding',\n  subtype: 'text',\n  id: '3EB042FA6555',\n  from: '15815954040',\n  text: 'oi',\n  isgroup: false,\n  reply: { id: undefined },\n  participant: '',\n  timestamp: 1633147282\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'forwarding',\n  message: 'message of erro'\n}\n```\n\n## Get Chats\n\n\u003e List All Chats of Conversations\n\n\n```javascript\nlet response = await client.getChats()\n\n```\n\nReturn with success \n```javascript\n{\n  session: 'Marketing',\n  type: 'get-chats',\n  chats: [\n    { id: '556181590153', name: 'Joe Dutra', mute: '0', spam: 'false' },\n    {\n      id: '5511982743910-1596072761',\n      name: 'Venom Support',\n      mute: '0',\n      spam: 'false'\n    }\n  ]\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'get-chats',\n  message: 'message of erro'\n}\n```\n## Read Chat Messages\n\n\u003e Read all messages from a chat\n\n\n```javascript\nlet response = await client.markReadAll('5561981590153')\n\n```\n\n\u003e Read message from a chat\n\n\n```javascript\nlet response = await client.markRead('5561981590153', '3EB01A690E67') // params: Number, MessageID\n\n```\n\n\nReturn with success \n```javascript\n{\n    session: 'Marketing',\n    status: 200,\n    type: \"mark-read\"\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'mark-read',\n  message: 'message of erro'\n}\n```\n## Get All Contacts\n\n\u003e List All Contacts\n\n\n```javascript\nlet response = await client.getAllContacts()\n\n```\n\nReturn with success \n```javascript\n{\n  session: 'Marketing',\n  type: 'get-all-contacts',\n  qt: 2,\n  contacts: [\n    {\n      id: '552123919428',\n      name: 'Alenii Venom',\n      short: ''\n    },\n    {\n      id: '556181590153',\n      name: 'Joe Dutra',\n      short: ''\n    }\n  ]\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'get-all-contacts',\n  message: 'message of erro'\n}\n```\n## Get Block List\n\n\u003e List All Contacts Blocking\n\n\n```javascript\nlet response = await client.getBlockList()\n\n```\n\nReturn with success \n```javascript\n{\n  session: 'Marketing',\n  type: 'get-block-list',\n  list: [ '5561986268199', '5561998745252' ]\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'get-block-list',\n  message: 'message of erro'\n}\n```\n\n## Mute Chat\n\n\u003e Silence or remove the silence of a particular chat for a specific period\n\n\n**Mute**\n```javascript\n//number of chat, timer: ['hour', 'week', 'ever']\nlet response = await client.muteChat(\"5561981590153\", \"hour\")\n\n```\n**Unmute**\n```javascript\n//number of chat\nlet response = await client.unmuteChat(\"5561981590153\")\n\n```\n\nReturn with success \n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'mute-chat',\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'mute-chat',\n  message: 'message of erro'\n}\n```\n## Archive Chat\n\n\u003e Archive or unarchive a specific chat\n\n\n**Archive**\n```javascript\n//number of chat, true\nlet response = await client.archiveChat(\"5561981590153\", true)\n\n```\n**Unarchive**\n```javascript\n//number of chat, false\nlet response = await client.archiveChat(\"5561981590153\", false)\n\n```\n\nReturn with success \n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'archive-chat',\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'archive-chat',\n  message: 'message of erro'\n}\n```\n## Delete Chat\n\n\u003e Delete a specific chat or group\n\n\n**Archive**\n```javascript\n//number of chat or group\nlet response = await client.deleteChat(\"5561981590153\")\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'delete-chat',\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'delete-chat',\n  message: 'message of erro'\n}\n```\n## Pin Chat\n\n\u003e Pin or unpin a specific chat or group\n\n\n**Pin**\n```javascript\n//number of chat, true\nlet response = await client.pinChat(\"5561981590153\", true)\n\n```\n**Unpin**\n```javascript\n//number of chat, false\nlet response = await client.pinChat(\"5561981590153\", false)\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'pin-chat',\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'pin-chat',\n  message: 'message of erro'\n}\n```\n## Block Contact\n\n\u003e Blocking or unblocking a specific contact\n\n\n**Block**\n```javascript\n//number of chat\nlet response = await client.blockContact(\"5561981590153\")\n\n```\n**Unblock**\n```javascript\n//number of chat\nlet response = await client.unblockContact(\"5561981590153\")\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'block-contact',\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'block-contact',\n  message: 'message of erro'\n}\n```\n## Get Profile Status\n\n\u003e Displays the text of the status of a specific contact\n\n\n```javascript\n//number of chat\nlet response = await client.getProfileStatus(\"5561981590153\")\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  type: 'get-profile-status',\n  status: 'Que Deus seja sempre louvado em nossas vidas'\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'get-profile-status',\n  message: 'message of erro'\n}\n```\n## Get Picture\n\n\u003e Displays the image of a specific contact\n\n\n```javascript\n//number of chat\nlet response = await client.getPicture(\"5561981590153\")\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'get-picture',\n  picture: 'https://pps.whatsapp.net/v/t61.24694-24/166060433_390988636021500_3494454124066997603_n.jpg?ccb=11-4\u0026oh=453e672ddc35e64ca123439f7a89d7d2\u0026oe=615EAAAF'\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'get-picture',\n  message: 'message of erro'\n}\n```\n## Set Picture\n\n\u003e Set image for profile or group\n\n\n```javascript\n//number of chat, file local path\nlet response = await client.setPicture(\"5561981590153\", \"./image-profile.png\")\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'set-picture'\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'set-picture',\n  message: 'message of erro'\n}\n```\n## Get Number Profile\n\n\u003e Checks if a number exists in the WhastApp\n\n```javascript\n//number of chat\nlet response = await client.getNumberProfile(\"5561981590153\")\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  type: 'get-number-profile',\n  id: '556181590153',\n  isBusiness: false,\n  exist: true\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'get-number-profile',\n  message: 'message of erro'\n}\n```\n\n## Groups Functions\n\nWe created the easiest way to create groups with **Superchats**\n\n## Create Group\n\n\u003e Create a group with participants\n\n\n```javascript\n//name of group, array with number of contacts\nlet response = await client.createGroup(\"Name Group\", [\"556181590153\", \"5561981819855\"])\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'create-group',\n  groupId: \"15815954040-1631239154\"\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'create-group',\n  message: 'message of erro'\n}\n```\n\n## Add Participants Group\n\n\u003e Add participants in group\n\n\n```javascript\n//id of group, array with number of contacts\nlet response = await client.addParticipantsGroup(\"15815954040-1631239154\", [\"556181590153\", \"5561981819855\"])\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'add-participants-group',\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'add-participants-group',\n  message: 'message of erro'\n}\n```\n## Add Admins Group\n\n\u003e Add or Remove participants of group as admin\n\n\n```javascript\n//id of group, array with number of contacts\nlet response = await client.addGroupAdmins(\"15815954040-1631239154\", [\"556181590153\", \"5561981819855\"])\n\n```\n```javascript\n//id of group, array with number of contacts\nlet response = await client.removeGroupAdmins(\"15815954040-1631239154\", [\"556181590153\", \"5561981819855\"])\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'add-group-admins',\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'add-group-admins',\n  message: 'message of erro'\n}\n```\n## Change Name of Group\n\n\u003e Change name of group\n\n\n```javascript\n//id of group, name group\nlet response = await client.groupTitle(\"15815954040-1631239154\", \"new name of group\")\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'group-title',\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'group-title',\n  message: 'message of erro'\n}\n```\n## Change Description of Group\n\n\u003e Change description of group\n\n\n```javascript\n//id of group, name group\nlet response = await client.groupDescription(\"15815954040-1631239154\", \"description of group\")\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'group-description',\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'group-description',\n  message: 'message of erro'\n}\n```\n## Join Group\n\n\u003e Join a group specified\n\n\n```javascript\n//id of group\nlet response = await client.joinGroup(\"15815954040-1631239154\")\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'join-group',\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'join-group',\n  message: 'message of erro'\n}\n```\n## Leave Group\n\n\u003e Leaves a group specified\n\n\n```javascript\n//id of group\nlet response = await client.leaveGroup(\"15815954040-1631239154\")\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'leave-group',\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'leave-group',\n  message: 'message of erro'\n}\n```\n\n## Revoke Group Link\n\n\u003e Revoke link from a specified group\n\n\n```javascript\n//id of group\nlet response = await client.revokeGroupLink(\"15815954040-1631239154\")\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'revoke-group-link',\n  linkGroup: 'G3M81fQbuwDB2cuAdPIv0h'\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'revoke-group-link',\n  message: 'message of erro'\n}\n```\n## Info Group\n\n\u003e Get info from a specified group\n\n\n```javascript\n//id of group\nlet response = await client.infoGroup(\"15815954040-1631239154\")\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  type: 'info-group',\n  status: 200,\n  id: '15795662985-1631581942',\n  owner: '15795662985@c.us',\n  title: 'Teste Grupo Live',\n  create: 1631581942,\n  participants: [\n    {\n      id: '556181590153',\n      name: 'Joe Dutra',\n      short: 'Joe',\n      isAdmin: false,\n      isSuperAdmin: false\n    },\n    {\n      id: '5521991977392',\n      name: 'Israel - Fabrica de Sonhos',\n      short: 'Israel - Fabrica',\n      isAdmin: false,\n      isSuperAdmin: false\n    }\n  ]\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'info-group',\n  message: 'message of erro'\n}\n```\n## Set Group Settings\n\n\u003e Get info from a specified group\n\n**Set sending messages in group only for admins**\n```javascript\n//id of group, type, boolean\nlet response = await client.setGroupSettings(\"15815954040-1631239154\", \"message\", true)\n\n```\n**Set change settings in group only for admins**\n```javascript\n//id of group, type, boolean\nlet response = await client.setGroupSettings(\"15815954040-1631239154\", \"settings\", true)\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'set-group-settings',\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'set-group-settings',\n  message: 'message of erro'\n}\n```\n## Get Groups List\n\n\u003e Get all groups list\n\n```javascript\nlet response = await client.getGroups()\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'get-groups',\n  chats: [\n    { id: '5511982743910-1596072761', name: 'Venom Support' },\n    { id: '556181590153-1625838636', name: 'Venom Business' }\n  ]\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'get-groups',\n  message: 'message of erro'\n}\n```\n\n## Get Host Device\n\n\u003e Get info of device\n\n```javascript\nlet response = await client.getHostDevice()\n\n```\n\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  status: 200,\n  type: 'get-host-device',\n  phone: '556181590153',\n  image: \"https://pps.whatsapp.net/v/t61.24694-24/254827313_500572874791871_6168181924916411415_n.jpg?stp=dst-jpg_s96x96\u0026ccb=11-4\u0026oh=5ee43eb4f1fe109b10ceba05292561aa\u0026oe=622FF53D\",\n  pushName: 'Joe Dutra'\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'get-host-device',\n  message: 'message of erro'\n}\n```\n## Chat Messages Functions\n\n\u003e Know the types of functions to recover chat messages\n\n**Take the last 10 messages from a chat**\n```javascript\n//number of chat, Number\nlet response = await client.getChatMessages('556181590153', 10)\n\n```\n**Take all messages from a chat**\n```javascript\n//number of chat\nlet response = await client.getChatAllMessages('556181590153')\n\n```\n**Take all unread messages from all chats**\n```javascript\nlet response = await client.getAllUnreadMessages()\n\n```\nReturn with success \n\n```javascript\n{\n  session: 'Marketing',\n  type: 'get-chat-messages',\n  messages: [\n    {\n      session: 'Marketing',\n      type: 'reply',\n      subtype: 'text',\n      id: '3EB082EFA70F',\n      from: '556181590153',\n      text: 'Oi',\n      isgroup: false,\n      reply: [Object],\n      participant: '',\n      timestamp: 1633407729\n    },\n    {\n      session: 'Marketing',\n      type: 'text',\n      id: '3EB0D91B1ECF',\n      from: '556181590153',\n      content: 'Oi',\n      isgroup: false,\n      participant: '',\n      timestamp: 1633408611\n    },\n    {\n      session: 'Marketing',\n      type: 'text',\n      id: '3EB0AD7A246F',\n      from: '556181590153',\n      content: 'Testando',\n      isgroup: false,\n      participant: '',\n      timestamp: 1633411173\n    },\n    {\n      session: 'Marketing',\n      type: 'text',\n      id: '46110924F9C202D3933AA4CBC2F209A3',\n      from: '556181590153',\n      content: 'Oi',\n      isgroup: false,\n      participant: '',\n      timestamp: 1633411357\n    },\n    {\n      session: 'Marketing',\n      type: 'text',\n      id: '3EB0EE5900AF',\n      from: '556181590153',\n      content: 'Testando',\n      isgroup: false,\n      participant: '',\n      timestamp: 1633411382\n    },\n    {\n      session: 'Marketing',\n      type: 'text',\n      id: '96033721D4426073C37802F407251F9A',\n      from: '556181590153',\n      content: 'Oi',\n      isgroup: false,\n      participant: '',\n      timestamp: 1633411396\n    },\n    {\n      session: 'Marketing',\n      type: 'text',\n      id: '3EB067D84A06',\n      from: '556181590153',\n      content: 'Testando',\n      isgroup: false,\n      participant: '',\n      timestamp: 1633411746\n    },\n    {\n      session: 'Marketing',\n      type: 'text',\n      id: '2CDF9BAF7E20E72BC74D602A339DA2C2',\n      from: '556181590153',\n      content: 'Oiiii',\n      isgroup: false,\n      participant: '',\n      timestamp: 1633411781\n    },\n    {\n      session: 'Marketing',\n      type: 'text',\n      id: '4DEBB46473A8E642E8764F6C70567089',\n      from: '556181590153',\n      content: 'Como vai???',\n      isgroup: false,\n      participant: '',\n      timestamp: 1633411792\n    },\n    {\n      session: 'Marketing',\n      type: 'text',\n      id: 'B536EAE6275FD6FF98F3E3326FE1682F',\n      from: '556181590153',\n      content: 'Top',\n      isgroup: false,\n      participant: '',\n      timestamp: 1633411811\n    }\n  ]\n}\n```\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'get-chat-messages',\n  message: 'message of erro'\n}\n```\n\n## Update Presence\n\nUpdate your presence for a certain contact\n\nTypes of state: a = available, c = composing, r = recording, p = paused\n\n```javascript\n//chat number, state: a, c, r, p\nlet response = await client.setPresence('556181590153', 'c');\n\n```\nReturn with success\n\n```javascript\n{ \n  session: 'Marketing',\n  status: 200, \n  type: 'set-presence' \n}\n```\n\nReturn with erro\n```javascript\n{\n  session: 'Marketing',\n  status: 404,\n  type: 'set-presence',\n  message: 'message of erro'\n}\n```\n\n## Observation Events\n\n\u003e Follow each event at the time that happen\n\n\n### **Received Message Event**\n\u003cbr\u003e\n\n\u003e Receive an event all the time you receive a message from some contact\n\n```javascript\n//event:any\nconst client = await superchats.create({\n  session: \"Marketing\",\n  license: \"asjdh-efddff734-sdsdf834-233272\",\n  multidevice: true, // (default is false) for used whatsapp beta\n  onMessage: (event) =\u003e {\n     console.log(event)\n})\n```\nReturn of event onMessage\n\n```javascript\n{\n  session: 'Marketing',\n  type: 'text',\n  id: '3EB07A5B9979E8CB453A',\n  from: '556181590153',\n  content: 'oiii',\n  isgroup: false,\n  participant: '',\n  timestamp: 1633414066\n}\n```\n\n### **Reading Confirmation Event**\n\u003cbr\u003e\n\n\u003e Receive an event every time you send a message to some contact with the States of: failed, pending, sent, received or read\n\n```javascript\n//event:any\nconst client = await superchats.create({\n  session: \"Marketing\",\n  license: \"asjdh-efddff734-sdsdf834-233272\",\n  multidevice: true, // (default is false) for used whatsapp beta\n  onAck: (event) =\u003e {\n     console.log(event)\n})\n```\nReturn of event onAck\n\n```javascript\n{\n  session: 'Marketing',\n  status: 'RECEIVED',\n  type: 'text',\n  id: '3EB02BC6217B',\n  to: '556181590153',\n  text: 'Hii',\n  isgroup: false,\n  timestamp: 1633414317\n}\n```\n### **Presence Event**\n\u003cbr\u003e\n\n\u003e Receive an event every time a contact is: typing, recording, online or offline with you\n\u003cbr\u003e\nTypes of state: **available**, **composing**, **recording** and **paused**\n\n```javascript\n//event:any\nconst client = await superchats.create({\n  session: \"Marketing\",\n  license: \"asjdh-efddff734-sdsdf834-233272\",\n  multidevice: true, // (default is false) for used whatsapp beta\n  onPresence: (event) =\u003e {\n     console.log(event)\n})\n\n```\nReturn of event onPresence\n\n```javascript\n{\n  session: 'Marketing',\n  from: '556181590153',\n  status: 'composing',\n  pushname: 'Joe Dutra'\n}\n```\n### **Group Event**\n\u003cbr\u003e\n\n\u003e Receive events all time the name of a group, configurations are changed\n\u003cbr\u003e\nTypes of return: **change-name**, **change-messages-admin**, **change-settings-admin** and **paused**\n\n```javascript\n//event:any\nconst client = await superchats.create({\n  session: \"Marketing\",\n  license: \"asjdh-efddff734-sdsdf834-233272\",\n  multidevice: true, // (default is false) for used whatsapp beta\n  onGroups: (event) =\u003e {\n     console.log(event)\n})\n```\nReturn of event onGroup\n\u003cbr\u003e\n\n##### **Name change group**\n\n```javascript\n{\n  session: 'Marketing',\n  action: 'change-name',\n  changed: [ 'Grupo Live', 'Teste Grupo Live' ],\n  group: 'Grupo Live',\n  from: '15795662985-1631581942',\n  participant: '15795662985',\n  participants: 3\n}\n```\n\n##### **Group changes for messages just for admins**\n\n```javascript\n{\n  session: 'Marketing',\n  action: 'change-messages-admin',\n  changed: 'active',\n  group: 'Grupo Live',\n  from: '15795662985-1631581942',\n  participant: '15795662985',\n  participants: 3\n}\n```\n##### **Group changes for settings just for admins**\n```javascript\n{\n  session: 'Marketing',\n  action: 'change-settings-admin',\n  changed: 'active',\n  group: 'Grupo Live',\n  from: '15795662985-1631581942',\n  participant: '15795662985',\n  participants: 3\n}\n```\n### **Participants Event**\n\u003cbr\u003e\n\n\u003e Receive events about group participants\n\u003cbr\u003e\n\nTypes of action: **add**, **remove**, **promote** and **demote**\n\n```javascript\n//event:any\nconst client = await superchats.create({\n  session: \"Marketing\",\n  license: \"asjdh-efddff734-sdsdf834-233272\",\n  multidevice: true, // (default is false) for used whatsapp beta\n  onParticipants: (event) =\u003e {\n     console.log(event)\n})\n\n```\nReturn of event onParticipants\n\u003cbr\u003e\n\n##### **Add participants**\n\n```javascript\n{\n  session: 'Marketing',\n  group: 'Grupo Live',\n  from: '15795662985-1631581942',\n  participant: '5521991977392',\n  action: 'add',\n  participants: 3\n}\n```\n##### **Remove participants**\n\n```javascript\n{\n  session: 'Marketing',\n  group: 'Grupo Live',\n  from: '15795662985-1631581942',\n  participant: '5521991977392',\n  action: 'remove',\n  participants: 2\n}\n```\n\n##### **Promote participants**\n\n```javascript\n{\n  session: 'Marketing',\n  group: 'Grupo Live',\n  from: '15795662985-1631581942',\n  participant: '5521991977392',\n  action: 'promote',\n  participants: 3\n}\n```\n##### **Demote participants**\n\n```javascript\n{\n  session: 'Marketing',\n  group: 'Grupo Live',\n  from: '15795662985-1631581942',\n  participant: '5521991977392',\n  action: 'demote',\n  participants: 3\n}\n```\n### **Delete Event**\n\u003cbr\u003e\n\n\u003e Receive events every time a message is deleted\n\n\n```javascript\n//event:any\nconst client = await superchats.create({\n  session: \"Marketing\",\n  license: \"asjdh-efddff734-sdsdf834-233272\",\n  multidevice: true, // (default is false) for used whatsapp beta\n  onDelete: (event) =\u003e {\n     console.log(event)\n})\n\n```\nReturn of event onDelete\n\u003cbr\u003e\n\n```javascript\n{\n  session: 'Marketing',\n  type: 'message-delete',\n  from: '15795662985-1631581942',\n  id: '3EB07E88FDCF1C4EF887',\n  timestamp: 1633453902\n}\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forkestral%2Fsuper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forkestral%2Fsuper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forkestral%2Fsuper/lists"}