How to write a Whatsapp bot in Java
We will tell you how to write a simple whatsapp bot in Java using our WhatsApp API.
Bot functionality:
- When sending the "chatid" command, the bot must send a message with the current chat ID;
- When sending the "file [format]" command, the bot must send pre-prepared files (pdf, jpg, doc, mp3);
- When sending the " ogg " command, the bot must send a file with the "ogg" extension (Voice message);
- When sending the "geo" command, the bot must send the geo coordinates (location);
- When sending the "group" command, the bot must create a group with itself and the user;
- Respond with a welcome message with a description of commands to all incoming non - "command" messages (as an analog of the " menu").
Detailed instructions for writing a bot can be found on our website:
Creating a Whatsapp bot in Java: step-by-step guide + sources (chat-api.com)