Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q | Create a WhatsApp bot #48

Closed
taaaal opened this issue Mar 5, 2024 · 3 comments
Closed

Q | Create a WhatsApp bot #48

taaaal opened this issue Mar 5, 2024 · 3 comments
Labels
question Further information is requested

Comments

@taaaal
Copy link

taaaal commented Mar 5, 2024

Hey there, I was wondering if there is an option to create a WhatsApp bot like a Discord bot by any chance?
~ In simple terms, to control an account who isn't yours, but is defined as an official WhatsApp bot.


My goal in the purpose of the program is to send (not through my account. maybe, from a bot/webhook) all the messages I receive from group x to group y.

Anyways, thanks for any incoming reply(:

@kocherovv
Copy link

Please clarify, do you want to have a WhatsApp bot that would listen to some kind of group or chat and forward messages from there to another chat?

Yes, you can write such a bot, but you will need a separate phone number and instance for this bot.

For example, you have an instance “A” to which you have your personal phone number attached. And also instance “B” to which the bot’s phone number is attached.
Your application should listen to webhooks from instance “A” and, if it receives an incoming message from your group X, forward its contents to group Y but from instance “B”.

@taaaal
Copy link
Author

taaaal commented Mar 5, 2024

Understood. Sorry for the poor explanation. I thought there is a system which maintains bots (of course without an attached phone number), in any case - irrelevant.

So is there a type of event that handles incoming and outgoing messages?

@kocherovv
Copy link

Unfortunately, there are no bots on WhatsApp without phone numbers like there are on Telegram or Discord.

Yes, all types of webhooks are described in our documentation:
https://greenapi.com/en/docs/api/receiving/notifications-format/

You can filter incoming messages by fields of the senderData object to determine the list of groups you want to listen to:
https://greenapi.com/en/docs/api/receiving/notifications-format/incoming-message/Webhook-IncomingMessageReceived/

@Amele9 Amele9 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2024
@Amele9 Amele9 added the question Further information is requested label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants