{"id":22079760,"url":"https://github.com/dmalbuquerque/brazuka-zap","last_synced_at":"2025-07-06T10:07:30.932Z","repository":{"id":42038217,"uuid":"382500552","full_name":"dmAlbuquerque/brazuka-zap","owner":"dmAlbuquerque","description":"Provides an API to send bulk messages via WhatsApp based on Venom Bot","archived":false,"fork":false,"pushed_at":"2022-07-07T01:48:48.000Z","size":420,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-10T19:46:18.404Z","etag":null,"topics":["api","send-message","send-message-whatsapp","venom-bot","whatsapp","whatsapp-api","whatsapp-free"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/brazuka-zap","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmAlbuquerque.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-03T01:37:45.000Z","updated_at":"2025-02-28T22:38:22.000Z","dependencies_parsed_at":"2022-09-14T09:22:07.475Z","dependency_job_id":null,"html_url":"https://github.com/dmAlbuquerque/brazuka-zap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dmAlbuquerque/brazuka-zap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmAlbuquerque%2Fbrazuka-zap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmAlbuquerque%2Fbrazuka-zap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmAlbuquerque%2Fbrazuka-zap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmAlbuquerque%2Fbrazuka-zap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmAlbuquerque","download_url":"https://codeload.github.com/dmAlbuquerque/brazuka-zap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmAlbuquerque%2Fbrazuka-zap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259645535,"owners_count":22889623,"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":["api","send-message","send-message-whatsapp","venom-bot","whatsapp","whatsapp-api","whatsapp-free"],"created_at":"2024-11-30T23:10:40.039Z","updated_at":"2025-07-06T10:07:30.917Z","avatar_url":"https://github.com/dmAlbuquerque.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Send messages for free via WhatsApp\n\n## Note\n**Brazuka-Zap** is an **unofficial** solution. We are not responsible for its use in production. \n\n\n\u003cbr\u003e\n\n# Installation\n```shell \nnpm i brazuka-zap\n```\n\nor\n\n```shell \nyarn add brazuka-zap\n```\n\n\u003cbr\u003e\n\n# Usage\n\nAt the beginning it will display a QR Code on Terminal, just scan it using WhatsApp app. Your session will be remembered, there is no need to authenticate everytime.\n\n\u003cbr\u003e\n\n# Table of Contents\n1. [Start Very Important](#1)\n2. [Send message to one contact](#2)\n3. [Send the same message to many contacts](#3)\n4. [Send the image](#4)\n5. [Send the link preview](#5)\n6. [Send the location](#6)\n7. [Creating a Bot](#7)\n\n\u003cbr\u003e\n\n\u003ca name=\"1\"\u003e\u003c/a\u003e\n\n## Very Important\nWith the start function, you can define a name for the session (passed as a string parameter), so you can have multiple WhatsApp sessions at the same time.\n\n\u003cblockquote\u003e\nFor the library to work correctly it is necessary to run the functions using async and await.\n\u003c/blockquote\u003e\n\n\u003cbr\u003e\n\n```js\nimport BrazukaZap from 'brazuka-zap';\n\ntest()\n\nasync function test(){\n\tvar brazuka = new BrazukaZap();\n\tawait brazuka.start(); // or await brazuka.start('session_name');\n}\n```\n\n\u003ca name=\"2\"\u003e\u003c/a\u003e\n\n## Send message to one contact\n```js\nimport BrazukaZap from 'brazuka-zap';\n\n\nconst phone = '558812345678'\nconst message = 'I\\'ll be there for you'\n\nawait brazuka.sendMessage(phone, message)\n``` \n\n\u003cbr\u003e\n\n\u003ca name=\"3\"\u003e\u003c/a\u003e\n\n## Send the same message to many contacts\n```js\nimport BrazukaZap from 'brazuka-zap';\n\nconst phones  = ['558812345678','556187654321']\nconst message = 'When the rain starts to pour'\n\nawait brazuka.sendMessage(phones, message)\n``` \n\n\u003cbr\u003e\n\n\u003ca name=\"4\"\u003e\u003c/a\u003e\n\n## Send the Image\n```js\nimport BrazukaZap from 'brazuka-zap';\n\nconst phone  = '558812345678'\nconst path   = 'path/to/image.jpg'\nconst imageName = 'my-image-name'\nconst caption = 'my-caption'\n\nawait brazuka.sendImage(phone, path, imageName, caption)\n``` \n\u003cbr\u003e\n\n\u003ca name=\"5\"\u003e\u003c/a\u003e\n\n## Send the link preview\n```js\nimport BrazukaZap from 'brazuka-zap';\n\nconst phone  = '558812345678'\nconst link   = 'https://youtu.be/RIjTq_OdFvo'\nconst message = 'You\\'re still in bed at ten\\nAnd work began at eight'\n\nawait brazuka.sendLinkPreview(phone, message)\n``` \n\n\u003cbr\u003e\n\n\u003ca name=\"6\"\u003e\u003c/a\u003e\n\n## Send the Location\n```js\nimport BrazukaZap from 'brazuka-zap';\n\nconst phone  = '558812345678'\nconst latitude = '-3.7594297599906294'\nconst longitude = '-40.81624143391349'\nconst local = 'Brasil'\n\nawait brazuka.sendLocation(phone, latitude, longitude, local)\n``` \n\u003cbr\u003e\n\n\u003ca name=\"7\"\u003e\u003c/a\u003e\n\n# Creating a Bot\nThe Bot will be listening to WhatsApp connected, and when it receives a new message, the Bot will respond according to what was previously registered. You can use Artificial Intelligence to improve your Bot if you wish.\n\n\u003cbr\u003e\n\n```js\ntry {\n  var zap = new BrazukaZap();\n\tawait zap.start();\n\n\tzap.onMessage((msg: any) =\u003e {\n\tswitch (msg.body.toLowerCase()) {\n\t\tcase 'hi': {\n\t\t\tzap.sendMessage(msg.from, `Hello ${msg.sender.pushname}, welcome to my awesome company!`)\n\t\t\tbreak\n\t\t}\n\t\tcase 'catalog': {\n\t\t\tzap.sendMessage(msg.from, 'Alright, I\\'ll be sending you our product catalog!')\n\t\t\tbreak\n\t\t}\n\t\tcase 'address': {\n\t\t\tzap.sendMessage(msg.from, 'Our address is: 666 Park Avenue')\n\t\t\tbreak\n\t\t}\n\t\tdefault: {\n\t\t\tzap.sendMessage(msg.from, 'Sorry, I couldn\\'t understand, I\\'m still learning about your world! 🤖')\n\t\t\tbreak\n\t\t}\n\t}\n\t})\n\t} catch (err) {\n\t\tconsole.log(err)\n\t}\n```\n\n## Example Response\n```json\n{\n  \"phone\": \"558812345678-1646089273\",\n  \"message\": \"Hello, welcome to my awesome company!\",\n  \"status\": \"OK\",\n  \"error\": false\n}\n```\n\n### Customizing the message\nTo customize the message, you will have the following properties to use, via the \u003ccode\u003emsg\u003c/code\u003e variable passed in the \u003ccode\u003eonMessage\u003c/code\u003e function\n```json\n{\n  \"id\":\"false_558812345678-1646200718@g.us_1BG7C215D2D4F156AE84E0862DD58880\",\n  \"body\":\"Hi\",\n  \"type\":\"chat\",\n  \"t\":1636110320,\n  \"notifyName\":\"\",\n  \"from\":\"558812345678-1646200718@g.us\",\n  \"to\":\"558898765432@c.us\",\n  \"author\":\"558812345678@c.us\",\n  \"self\":\"in\",\n  \"ack\":0,\n  \"invis\":false,\n  \"isNewMsg\":true,\n  \"star\":false,\n  \"recvFresh\":true,\n  \"isFromTemplate\":false,\n  \"broadcast\":false,\n  \"mentionedJidList\":[\n    \n  ],\n  \"isVcardOverMmsDocument\":false,\n  \"isForwarded\":false,\n  \"labels\":[\n    \n  ],\n  \"ephemeralOutOfSync\":false,\n  \"productHeaderImageRejected\":false,\n  \"isDynamicReplyButtonsMsg\":false,\n  \"isMdHistoryMsg\":false,\n  \"chatId\":\"558812345678-1646200718@g.us\",\n  \"fromMe\":false,\n  \"sender\":{\n    \"id\":\"558812345678@c.us\",\n    \"name\":\"Daniel\",\n    \"shortName\":\"Daniel\",\n    \"pushname\":\"Daniel Albuquerque\",\n    \"type\":\"in\",\n    \"isBusiness\":false,\n    \"isEnterprise\":false,\n    \"statusMute\":false,\n    \"labels\":[\n      \n    ],\n    \"formattedName\":\"Daniel\",\n    \"isMe\":false,\n    \"isMyContact\":true,\n    \"isPSA\":false,\n    \"isUser\":true,\n    \"isWAContact\":true,\n    \"profilePicThumbObj\":{\n      \"eurl\":\"https://pps.whatsapp.net/v/t61.24694-24/155555555_000000000000000_777441025896523658_n.jpg?ccb=11-4\u0026oh=a5024da3cd299dbaf16b1da1a4a98ee6\u0026oe=60F16F53\",\n      \"id\":\"558812345678@c.us\",\n      \"img\":\"https://web.whatsapp.com/pp?e=https%3A%2F%2Fpps.whatsapp.net%2Fv%2Ft61.24694-24%2F153312958_000000000000000_777441025896523658_n.jpg%3Fccb%3D11-4%26oh%3Da5024da3cd299dbaf16b1da1a4a98ee6%26oe%3D60F16F53\u0026t=s\u0026u=558812345678%40c.us\u0026i=1613954550\u0026n=q417zd84AaHW0He4pHzwT3lADc7RH%2BDbvUuDBwScb%2F4%3D\",\n      \"imgFull\":\"https://web.whatsapp.com/pp?e=https%3A%2F%2Fpps.whatsapp.net%2Fv%2Ft61.24694-24%2F153312958_000000000000000_777441025896523658_n.jpg%3Fccb%3D11-4%26oh%3Da5024da3cd299dbaf16b1da1a4a98ee6%26oe%3D60F16F53\u0026t=l\u0026u=558812345678%40c.us\u0026i=1613954550\u0026n=q417zd84AaHW0He4pHzwT3lADc7RH%2BDbvUuDBwScb%2F4%3D\",\n      \"raw\":null,\n      \"tag\":\"1613454350\"\n    },\n    \"msgs\":null\n  },\n  \"timestamp\":1836010520,\n  \"content\":\"Hi\",\n  \"isGroupMsg\":true,\n  \"isMedia\":false,\n  \"isNotification\":false,\n  \"isPSA\":false,\n  \"chat\":{\n    \"id\":\"558812345678-1646200718@g.us\",\n    \"pendingMsgs\":false,\n    \"lastReceivedKey\":{\n      \"fromMe\":true,\n      \"remote\":\"558812345678-1646200718@g.us\",\n      \"id\":\"1IBRGOQDW44CNCDN9TFQ\",\n      \"_serialized\":\"true_558812345678-1646200718@g.us_1IBRGOQDW44CNCDN9TFQ\"\n    },\n    \"t\":1626118707,\n    \"unreadCount\":0,\n    \"archive\":false,\n    \"isReadOnly\":false,\n    \"isAnnounceGrpRestrict\":false,\n    \"muteExpiration\":0,\n    \"name\":\"HL\",\n    \"notSpam\":true,\n    \"pin\":0,\n    \"msgs\":null,\n    \"kind\":\"group\",\n    \"isGroup\":true,\n    \"contact\":{\n      \"id\":\"558812345678-1646200718@g.us\",\n      \"name\":\"HL\",\n      \"type\":\"in\",\n      \"isBusiness\":false,\n      \"isEnterprise\":false,\n      \"statusMute\":false,\n      \"labels\":[\n        \n      ],\n      \"formattedName\":\"HL\",\n      \"isMe\":false,\n      \"isMyContact\":false,\n      \"isPSA\":false,\n      \"isUser\":false,\n      \"isWAContact\":false,\n      \"profilePicThumbObj\":[\n        \"Object\"\n      ],\n      \"msgs\":null\n    },\n    \"groupMetadata\":{\n      \"id\":\"558812345678-1646200718@g.us\",\n      \"creation\":1646200718,\n      \"owner\":\"558812345678@c.us\",\n      \"restrict\":false,\n      \"announce\":false,\n      \"noFrequentlyForwarded\":false,\n      \"ephemeralDuration\":0,\n      \"support\":false,\n      \"uniqueShortNameMap\":{\n        \n      },\n      \"participants\":[\n        \"Array\"\n      ],\n      \"pendingParticipants\":[\n        \n      ]\n    },\n    \"presence\":{\n      \"id\":\"558812345678-1646200718@g.us\",\n      \"chatstates\":[\n        \"Array\"\n      ]\n    },\n    \"isOnline\":true,\n    \"lastSeen\":null\n  }\n}\n```\n\n\u003cbr\u003e\n\n## 🛠️ Coming soon 🛠️\nNew functions will be added soon.\n\u003cbr\u003e\n\n## 🚀 Contribution\nContributions make the open source community an amazing place to learn, inspire and create. Any contribution you make will be **much appreciated**.\n\u003cbr\u003e\n\n## ✔️ License\nDistributed under license [MIT](LICENSE). © Daniel Albuquerque\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmalbuquerque%2Fbrazuka-zap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmalbuquerque%2Fbrazuka-zap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmalbuquerque%2Fbrazuka-zap/lists"}