{"name":"WPPConnect/WA-JS: Exporting WhatsApp Web Functions for Automation","description":"WPPConnect/WA-JS is an open-source TypeScript project designed to export functions from WhatsApp Web. It enables developers to create custom interactions, automate tasks, and build powerful integrations for customer service, media sending, and more. With a comprehensive API, it simplifies the process of interacting with WhatsApp Web programmatically.","github":"https://github.com/wppconnect-team/wa-js","url":"https://osrepos.com/repo/wppconnect-team-wa-js","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/wppconnect-team-wa-js","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/wppconnect-team-wa-js.md","json":"https://osrepos.com/repo/wppconnect-team-wa-js.json","topics":["whatsapp","whatsapp-api","whatsapp-automation","typescript","web-automation","wppconnect","bot-development","integration"],"keywords":["whatsapp","whatsapp-api","whatsapp-automation","typescript","web-automation","wppconnect","bot-development","integration"],"stars":null,"summary":"WPPConnect/WA-JS is an open-source TypeScript project designed to export functions from WhatsApp Web. It enables developers to create custom interactions, automate tasks, and build powerful integrations for customer service, media sending, and more. With a comprehensive API, it simplifies the process of interacting with WhatsApp Web programmatically.","content":"## Introduction\nWPPConnect/WA-JS is an open-source TypeScript project dedicated to exporting core functions from WhatsApp Web. This powerful tool empowers developers to build sophisticated automation solutions, custom interactions, and seamless integrations with WhatsApp. Whether you're looking to create customer service bots, automate media sending, or implement intelligent recognition systems, WA-JS provides the foundational capabilities. With a vibrant community, boasting over 580 stars and 170 forks on GitHub, it stands as a robust and actively maintained resource for WhatsApp Web automation.\n\n## Installation\nTo get started with WPPConnect/WA-JS, you can follow these simple steps:\n\nFirst, install the project dependencies:\nbash\nnpm install\n\n\nNext, build the JavaScript files. For production, use:\nbash\nnpm run build:prd\n\nFor development, you can use `npm run build:dev`.\n\nTo launch a local browser with automatic injection for testing:\nbash\nnpm run launch:local\n\n\n## Examples\nWPPConnect/WA-JS is designed to be injected into the browser where WhatsApp Web is running. Here are common ways to utilize it:\n\n### Using TamperMonkey or GreaseMonkey:\nFor browser extensions, you can use a user script to inject `wppconnect-wa.js`:\njavascript\n// ==UserScript==\n// @name         WA-JS Teste\n// @namespace    http://tampermonkey.net/\n// @version      0.1\n// @description  Simple example of WA-JS\n// @author       You\n// @match        https://web.whatsapp.com/*\n// @icon         https://www.google.com/s2/favicons?domain=whatsapp.com\n// @require      https://github.com/wppconnect-team/wa-js/releases/download/nightly/wppconnect-wa.js\n// @grant        none\n// ==/UserScript==\n\n/* globals WPP */\n\n(function () {\n  'use strict';\n\n  WPP.webpack.onReady(function () {\n    alert('Ready to use WPPConnect WA-JS');\n  });\n\n  // Your code here...\n})();\n\n\n### Using Playwright for Headless Automation:\nFor programmatic control in Node.js environments, Playwright is an excellent choice:\ntypescript\nimport * as playwright from 'playwright-chromium';\n\nasync function start() {\n  const browser = await playwright.chromium.launch();\n  const page = await browser.newPage();\n\n  await page.goto('https://web.whatsapp.com/');\n\n  await page.addScriptTag({\n    path: require.resolve('@wppconnect/wa-js'),\n  });\n\n  // Wait WA-JS load\n  await page.waitForFunction(() => window.WPP?.isReady);\n\n  // Evaluating code: See https://playwright.dev/docs/evaluating/\n  const isAuthenticated: string = await page.evaluate(() =>\n    WPP.conn.isAuthenticated()\n  );\n\n  // Sending message: See https://playwright.dev/docs/evaluating/\n  const sendResult: string = await page.evaluate(\n    (to, message) => WPP.chat.sendTextMessage(to, message),\n    to,\n    message\n  );\n}\n\nstart();\n\n\n## Why Use WPPConnect/WA-JS?\nWPPConnect/WA-JS offers a robust and flexible solution for anyone looking to interact with WhatsApp Web programmatically. Its key advantages include:\n\n*   **Comprehensive API**: Access a wide range of WhatsApp functionalities, including connection status (`WPP.conn`), chat operations (`WPP.chat.sendTextMessage`, `WPP.chat.getChat`), contact management (`WPP.contact.getContact`, `WPP.contact.blockContact`), and group interactions (`WPP.group.createGroup`, `WPP.group.addParticipant`).\n*   **Event-Driven Architecture**: Respond to real-time events, such as new messages, using `WPP.chat.on('chat.new_message')`, enabling dynamic and responsive applications.\n*   **Flexible Integration**: Easily integrate with various environments, from browser user scripts (TamperMonkey, GreaseMonkey) to headless browser automation tools like Playwright.\n*   **Open-Source and Community Support**: Benefit from an active open-source community, continuous development, and a wealth of shared knowledge and examples.\n*   **Powerful Automation**: Build sophisticated bots and automation workflows for customer support, marketing, data extraction, and more, leveraging the full power of WhatsApp Web.\n\n## Links\n*   [GitHub Repository](https://github.com/wppconnect-team/wa-js)\n*   [npm Package](https://www.npmjs.com/package/@wppconnect/wa-js)\n*   [Discord Community](https://discord.gg/JU5JGGKGNG)\n*   [YouTube Channel](https://www.youtube.com/c/wppconnect)\n*   [WhatsApp Group](https://chat.whatsapp.com/LJaQu6ZyNvnBPNAVRbX00K)\n*   [Telegram Group](https://t.me/wppconnect)\n*   [API Documentation](https://wppconnect.io/wa-js/types/ev.EventTypes.html)","metrics":{"detailViews":10,"githubClicks":3},"dates":{"published":null,"modified":"2025-10-12T09:46:15.000Z"}}