TypeScript icon, indicating that this package has built-in type declarations

0.0.13 • Public • Published

Send messages for free via WhatsApp


Brazuka-Zap is an unofficial solution. We are not responsible for its use in production.


npm i brazuka-zap


yarn add brazuka-zap


At 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.

Table of Contents

  1. Start Very Important
  2. Send message to one contact
  3. Send the same message to many contacts
  4. Send the image
  5. Send the link preview
  6. Send the location
  7. Creating a Bot

Very Important

With 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.

For the library to work correctly it is necessary to run the functions using async and await.

import BrazukaZap from 'brazuka-zap';


async function test(){
	var brazuka = new BrazukaZap();
	await brazuka.start(); // or await brazuka.start('session_name');

Send message to one contact

import BrazukaZap from 'brazuka-zap';

const phone = '558812345678'
const message = 'I\'ll be there for you'

await brazuka.sendMessage(phone, message)

Send the same message to many contacts

import BrazukaZap from 'brazuka-zap';

const phones  = ['558812345678','556187654321']
const message = 'When the rain starts to pour'

await brazuka.sendMessage(phones, message)

Send the Image

import BrazukaZap from 'brazuka-zap';

const phone  = '558812345678'
const path   = 'path/to/image.jpg'
const imageName = 'my-image-name'
const caption = 'my-caption'

await brazuka.sendImage(phone, path, imageName, caption)

Send the link preview

import BrazukaZap from 'brazuka-zap';

const phone  = '558812345678'
const link   = ''
const message = 'You\'re still in bed at ten\nAnd work began at eight'

await brazuka.sendLinkPreview(phone, message)

Send the Location

import BrazukaZap from 'brazuka-zap';

const phone  = '558812345678'
const latitude = '-3.7594297599906294'
const longitude = '-40.81624143391349'
const local = 'Brasil'

await brazuka.sendLocation(phone, latitude, longitude, local)

Creating a Bot

The 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.

try {
  var zap = new BrazukaZap();
	await zap.start();

	zap.onMessage((msg: any) => {
	switch (msg.body.toLowerCase()) {
		case 'hi': {
			zap.sendMessage(msg.from, `Hello ${msg.sender.pushname}, welcome to my awesome company!`)
		case 'catalog': {
			zap.sendMessage(msg.from, 'Alright, I\'ll be sending you our product catalog!')
		case 'address': {
			zap.sendMessage(msg.from, 'Our address is: 666 Park Avenue')
		default: {
			zap.sendMessage(msg.from, 'Sorry, I couldn\'t understand, I\'m still learning about your world! 🤖')
	} catch (err) {

Example Response

  "phone": "558812345678-1646089273",
  "message": "Hello, welcome to my awesome company!",
  "status": "OK",
  "error": false

Customizing the message

To customize the message, you will have the following properties to use, via the msg variable passed in the onMessage function

    "pushname":"Daniel Albuquerque",

🛠️ Coming soon 🛠️

New functions will be added soon.

🚀 Contribution

Contributions make the open source community an amazing place to learn, inspire and create. Any contribution you make will be much appreciated.

✔️ License

Distributed under license MIT. © Daniel Albuquerque

Package Sidebar


Weekly Downloads






Unpacked Size

158 kB

Total Files


Last publish


  • dmalbuquerque