Reputation: 41
I am trying to make a WhatsApp bot inspired by the functioning of Discord bots, the bot will work in WhatsApp groups.
I have looked up the official WhatsApp Business API but I am not sure that they will not approve my number as it is just a hobby project and not a proper "business".
There is an alternative though and that is the Twilio WhatsApp API. However, they provide you with a sandbox. I can interact with it in DMs but as the sandbox number is a business account, I cannot add it to a group like discord.
I intend to write a server in python or node.
Can anyone share a solution or workaround? Only if I could add the Twilio number to a group my problem will be solved. Though I am ready to use any other API/Solutions for this.
Upvotes: 4
Views: 7562
Reputation: 95
You can use this replit template by forking it.
https://replit.com/@AllailQadrillah/Whatsapp-Bot
WhatsApp bot is built using the unofficial api from whatsapp-web.js which can save sessions on mongodb and is active for 24 hours
Upvotes: 0
Reputation: 1031
There is actually a Python solution for this. It is a pain to set it up, but it still works. Check it out:
https://github.com/mukulhase/WebWhatsapp-Wrapper
It uses the webdriver Selenium to send/retrieve messages through Web-WhatsApp.
Be aware that it is against their rules, so your phone number might get banned!
Upvotes: 3