{"id":13493900,"url":"https://github.com/open-wa/wa-automate-nodejs","last_synced_at":"2025-05-12T13:07:44.956Z","repository":{"id":37178198,"uuid":"202445312","full_name":"open-wa/wa-automate-nodejs","owner":"open-wa","description":" 💬 🤖  The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates! ","archived":false,"fork":false,"pushed_at":"2025-02-19T01:28:17.000Z","size":180863,"stargazers_count":3279,"open_issues_count":146,"forks_count":625,"subscribers_count":112,"default_branch":"master","last_synced_at":"2025-05-12T13:07:00.119Z","etag":null,"topics":["api","chatbots","framework","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://docs.openwa.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-wa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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,"zenodo":null},"funding":{"custom":["https://payitfwd.dev/open-wa/wa-automate-nodejs"]}},"created_at":"2019-08-15T00:25:26.000Z","updated_at":"2025-05-12T11:55:00.000Z","dependencies_parsed_at":"2023-11-09T11:51:54.295Z","dependency_job_id":"fb95a5ef-1e4c-4499-b502-db54f47e3a93","html_url":"https://github.com/open-wa/wa-automate-nodejs","commit_stats":{"total_commits":4235,"total_committers":33,"mean_commits":"128.33333333333334","dds":"0.41723730814639903","last_synced_commit":"b6a9cd6095460f258e1bfd4d976e304bf8cc1114"},"previous_names":["smashah/sulla"],"tags_count":752,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-wa%2Fwa-automate-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-wa%2Fwa-automate-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-wa%2Fwa-automate-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-wa%2Fwa-automate-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-wa","download_url":"https://codeload.github.com/open-wa/wa-automate-nodejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745152,"owners_count":21957317,"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","chatbots","framework","nodejs","typescript"],"created_at":"2024-07-31T19:01:19.887Z","updated_at":"2025-05-12T13:07:44.917Z","avatar_url":"https://github.com/open-wa.png","language":"TypeScript","funding_links":["https://payitfwd.dev/open-wa/wa-automate-nodejs","http://otechie.com/smashah","https://www.buymeacoffee.com/smashah"],"categories":["Uncategorized","TypeScript","AI Agents and Automation"],"sub_categories":["Uncategorized"],"readme":"\u003e [!WARNING]  \n\u003e By visiting this page you [explicitly agree to the Terms of Service (read here)](https://github.com/open-wa/wa-automate-nodejs/blob/master/tos.md)\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/open-wa/wa-automate-nodejs/master/resources/hotfix-logo.png\" width=\"128\" height=\"128\"/\u003e\n\n# wa-automate-nodejs\n\n\u003e wa-automate-nodejs is the most advanced NodeJS library which provides a high-level API to control WA.\n\u003e\n\u003e\n\n[![Ceasefire Now](https://badge.techforpalestine.org/ceasefire-now)](https://techforpalestine.org/learn-more)\n\n[![npm version](https://img.shields.io/npm/v/@open-wa/wa-automate.svg?color=green)](https://www.npmjs.com/package/@open-wa/wa-automate)\n![node](https://img.shields.io/node/v/@open-wa/wa-automate)\n[![Downloads](https://img.shields.io/npm/dm/@open-wa/wa-automate.svg)](https://www.npmjs.com/package/@open-wa/wa-automate)\n[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/open-wa/wa-automate-nodejs.svg)](http://isitmaintained.com/project/open-wa/wa-automate-nodejs \"Average time to resolve an issue\")\n[![Percentage of issues still open](http://isitmaintained.com/badge/open/open-wa/wa-automate-nodejs.svg)](http://isitmaintained.com/project/open-wa/wa-automate-nodejs \"Percentage of issues still open\")\n\n\u003ca href=\"https://discord.gg/dnpp72a\"\u003e\u003cimg src=\"https://img.shields.io/discord/661438166758195211?color=blueviolet\u0026label=discord\u0026style=flat\" /\u003e\u003c/a\u003e ![WhatsApp_Web 2.2147.16](https://img.shields.io/badge/WhatsApp_Web-2.2147.16-brightgreen.svg)\u003cimg alt=\"Twitter Follow\" src=\"https://img.shields.io/twitter/follow/openwadev?label=Follow%20%40openwadev%20for%20updates\u0026logo=twitter\u0026style=social\"/\u003e\n\n\u003ca href=\"https://cloud.digitalocean.com/apps/new?repo=https%3A%2F%2Fgithub.com%2Fopen-wa%2Fwa-automate-docker%2Ftree%2Fmaster\u0026refcode%3D4b093f6ecd3a\u0026utm_campaign=Referral_Invite\u0026utm_medium=Referral_Program\u0026utm_source=badge\"\u003e\n \u003cimg style=\"max-height:200px\" src=\"https://raw.githubusercontent.com/open-wa/wa-automate-deploy-heroku/main/assets/do_deploy.png\" alt=\"Deploy to DO\"/\u003e\n\u003c/a\u003e\n\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#functions-list\"\u003eKey Features\u003c/a\u003e •\n  \u003ca href=\"https://docs.openwa.dev/docs/get-started/installation\"\u003eGetting Started\u003c/a\u003e •\n  \u003ca href=\"https://docs.openwa.dev/docs/get-started/quick-run\"\u003eEasy API\u003c/a\u003e •\n  \u003ca href=\"https://docs.openwa.dev/docs/api/classes/api_Client.Client\"\u003eDocumentation\u003c/a\u003e •\n  \u003ca href=\"https://openwa.page.link/key\"\u003eGet a License Key\u003c/a\u003e •\n  \u003ca href=\"#support\"\u003eSupport\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c/div\u003e\n\n## Installation and Updating\n\nUse this command to install the library for the first time and to keep the library up to date.\n\n```bash\n\u003e npm i --save @open-wa/wa-automate@latest\n```\n\n## Usage\n\n## CLI\n\nWant to convert your WA account to an API instantly? You can now with the CLI. For more details see [Easy API](https://docs.openwa.dev/pages/Getting%20Started/quick-run.html)\n\n```bash\n\u003e npx @open-wa/wa-automate --help\n```\n\n## Custom Setup\n\nLearn more about all possible configuration options here: [ConfigObject](https://docs.openwa.dev/interfaces/api_model_config.ConfigObject.html)\n\n```javascript\nconst wa = require('@open-wa/wa-automate');\n\nwa.create({\n  sessionId: \"COVID_HELPER\",\n  multiDevice: true, //required to enable multiDevice support\n  authTimeout: 60, //wait only 60 seconds to get a connection with the host account device\n  blockCrashLogs: true,\n  disableSpins: true,\n  headless: true,\n  hostNotificationLang: 'PT_BR',\n  logConsole: false,\n  popup: true,\n  qrTimeout: 0, //0 means it will wait forever for you to scan the qr code\n}).then(client =\u003e start(client));\n\nfunction start(client) {\n  client.onMessage(async message =\u003e {\n    if (message.body === 'Hi') {\n      await client.sendText(message.from, '👋 Hello!');\n    }\n  });\n}\n\n```\n\n###### After executing `create()` function, **@open-wa/wa-automate** will create an instance of WA web. If you are not logged in, it will print a QR code in the [terminal](https://i.imgur.com/g8QvERI.png). Scan it with your phone and you are ready to go!\n\n###### @open-wa/wa-automate will remember the session so there is no need to authenticate every time\n\n\n## Multi Device Support\n\nWe're currently in a weird transitionary period where some people are being forced to adopt Multi Device (MD). Once the transition is complete, the library default will be to turn on MD support. For now, you have to set it yourself explicitly either by using the `--multi-device` flag (with the [CLI](#CLI)) or setting `multiDevice: true` in your config (with your custom code)\n\n### Latest Changes\n\nWith the constant updates from WA. It is advisable to always use the latest version of `@open-wa/wa-automate`.\n\n   \u003cdiv align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/open-wa/wa-automate-nodejs/master/release.png\"/\u003e\n   \u003c/div\u003e\n\n### Functions list\n\n| Function                          | Reference |\n| --------------------------------- | ----------- |\n| Receive message                   | [onMessage](https://docs.openwa.dev/classes/api_Client.Client.html#onMessage)\n| Automatic QR Refresh              | [autoRefresh](https://docs.openwa.dev/classes/api_Client.Client.html#autoRefresh)\n| Send text                         | [sendText](https://docs.openwa.dev/classes/api_Client.Client.html#sendText)\n| Get contacts                      | [getContact](https://docs.openwa.dev/classes/api_Client.Client.html#getContact)\n| Get chats                         | [getAllChats](https://docs.openwa.dev/classes/api_Client.Client.html#getAllChats)\n| Get groups                        | [getAllGroups](https://docs.openwa.dev/classes/api_Client.Client.html#getAllGroups)\n| Get group members                 | [getGroupMembersId](https://docs.openwa.dev/classes/api_Client.Client.html#getGroupMembersId)\n| Send contact                      | [sendContact](https://docs.openwa.dev/classes/api_Client.Client.html#sendContact)\n| Send Images (image)              | [sendImage](https://docs.openwa.dev/classes/api_Client.Client.html#sendImage)\n| Send media (audio, doc) | [sendFile](https://docs.openwa.dev/classes/api_Client.Client.html#sendFile)\n| Send media (video)  | [Send Videos](https://docs.openwa.dev/pages/How%20to/send-files/send-videos.html)\n| Send stickers                     | [sendStickerfromUrl](https://docs.openwa.dev/classes/api_Client.Client.html#sendStickerFromuUrl)\n| Decrypt media (image, audio, doc) | [Decrypt Media](https://docs.openwa.dev/pages/How%20to/decrypt-media.html)\n| Capturing QR Code                 | [Capturing QR Code](https://docs.openwa.dev/pages/The%20Client/launch-events/capture-qr.html)\n| Multiple Sessions                 | [Multiple Sessions](https://docs.openwa.dev/pages/The%20Client/the-client/multiple-sessions.html)\n| Last seen      | [getLastSeen](https://docs.openwa.dev/classes/api_Client.Client.html#getLastSeen)\n| isOnline      | [isChatOnline](https://docs.openwa.dev/classes/api_Client.Client.html#isChatOnline)\n| 📍 Send Location      | [sendLocation](https://docs.openwa.dev/classes/api_Client.Client.html#sendLocation)\n| Simulated '...typing'             | [simulateTyping](https://docs.openwa.dev/classes/api_Client.Client.html#simulateTyping)\n| Send GIFs!                       | [sendVideoAsGif](https://docs.openwa.dev/classes/api_Client.Client.html#sendVideoAsGif)\n| Send Giphy!                       | [sendGiphy](https://docs.openwa.dev/classes/api_Client.Client.html#sendGiphy)\n| Forward Messages                  | [forwardMessages](https://docs.openwa.dev/classes/api_Client.Client.html#forwardMessages)\n| Listen to Read Receipts           | [onAck](https://docs.openwa.dev/classes/api_Client.Client.html#onAck)\n| Listen to Live Locations           | [onLiveLocation](https://docs.openwa.dev/classes/api_Client.Client.html#onLiveLocation)\n| Group participant changes         | [onParticipantsChanged](https://docs.openwa.dev/classes/api_Client.Client.html#onParticipantsChanged)\n| Create Groups         | [Create Group](https://docs.openwa.dev/pages/How%20to/groups.html#create-a-group)\n| add, remove, promote, demote participants        | [Manage Participants](https://docs.openwa.dev/pages/How%20to/groups/manage-participants.html)\n\n[Checkout all the available functions here.](https://docs.openwa.dev/classes/api_Client.Client.html)\n\n## Running the demo\n\nYou can clone this repo and run the demo, but you will need to use typescript/ts-node:\n\n```bash\n\u003e git clone https://github.com/open-wa/wa-automate-nodejs.git\n\u003e cd wa-automate-nodejs\n\u003e npm i\n\u003e npm i -g ts-node typescript\n\u003e cd demo\n\u003e ts-node index.ts\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## Support\n\nIf you need paid support, consulting, or just want support/sponsor the ongoing development of this project, you can in the following ways:\n\n|Description | Link |\n|-\t|:-:|\n| Get a License key | \u003ca class=\"gumroad-button\" href=\"https://gum.co/BTMt?wanted=true\" target=\"_blank\" data-gumroad-single-product=\"true\" style='background-color: white !important;background-image: url(https://gumroad.com/button/button_bar.jpg) !important;background-repeat: repeat-x !important;border-radius: 4px !important;box-shadow: rgba(0, 0, 0, 0.4) 0 0 2px !important;color: #999 !important;display: inline-block !important;font-family: -apple-system, \".SFNSDisplay-Regular\", \"Helvetica Neue\", Helvetica, Arial, sans-serif !important;font-size: 16px !important;font-style: normal !important;font-weight: 500 !important;line-height: 50px !important;padding: 0 15px !important;text-shadow: none !important;text-decoration: none !important;'\u003e\u003cspan class=\"gumroad-button-logo\" style='background-image: url(https://gumroad.com/button/button_logo.png) !important;background-size: cover !important;height: 17px !important;width: 16px !important;display: inline-block !important;margin-bottom: -3px !important;margin-right: 15px !important;'\u003e\u003c/span\u003eGet a License key\u003c/a\u003e\n| Donate or Book 1 hour consult | [![Buy me a coffee][buymeacoffee-shield]][buymeacoffee]\n| Per-minute consulting |   \u003ca href=\"http://otechie.com/smashah\"\u003e\u003cimg src=\"https://api.otechie.com/consultancy/smashah/badge.svg\" alt=\"Consulting\"/\u003e\u003c/a\u003e\n| Hire me! | [![Consulting Request][consult-shield]][consult]\n\n## License\n\n[Hippocratic + Do Not Harm Version 1.0](https://github.com/open-wa/wa-automate-nodejs/blob/master/LICENSE.md)\n\n## Legal\n\nThis code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WA or any of its affiliates or subsidiaries. This is an independent and unofficial software. Use at your own risk.\n\n## Cryptography Notice\n\nThis distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See [http://www.wassenaar.org/](http://www.wassenaar.org/) for more information.\n\nThe U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.\n\n[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg\n[buymeacoffee]: https://www.buymeacoffee.com/smashah\n[consult-shield]: https://img.shields.io/badge/Require%20Paid%20Support%20or%20Consulting%3F-Click%20Here-blue?style=for-the-badge\u0026logo=paypal\n[consult]: mailto:shah@openwa.dev?subject=WhatsApp%20Consulting\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-wa%2Fwa-automate-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-wa%2Fwa-automate-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-wa%2Fwa-automate-nodejs/lists"}