Welcome to WAPI Starter, a WhatsApp API template designed to simplify the integration of WhatsApp messaging using the whiskeysockets/baileys
package. This repository provides a structured and scalable implementation using NestJS as the base API framework, making it easier for developers to get started quickly.
-
WhatsApp Integration: Utilizes
whiskeysockets/baileys
to manage WhatsApp sessions efficiently. -
NestJS Framework: Built on top of NestJS for a modular and maintainable API.
-
Session Management: Easily manage WhatsApp sessions for multiple users or numbers.
-
QR Code Authentication: Scan QR codes to establish secure connections with WhatsApp.
-
Messaging & Events: Send and receive messages, listen to events, and handle webhooks.
-
RESTful API: Exposes endpoints for easy interaction with the WhatsApp API.
-
Mapped Message:
Type Status Text ✅ Image ✅ Sticker ✅ Video ✅ Audio ✅ Document ✅ Location ✅ Contact ✅ Live Location ❌ Polling ❌ Event ❌ Product ❌ And Others Not Yet Discovered... ⭕
Ensure you have the following installed on your system:
-
Clone the repository:
git clone https://github.com/azickri/wapi-starter.git cd wapi-starter
-
Install dependencies:
npm install
or
yarn install
-
Configure environment variables:
- Create a
.env
file in the root directory and configure the required settings (refer to.env.example
).
- Create a
-
Start the development server:
npm run start:dev
or
yarn start:dev
- Run the API server.
- Call the API endpoint to generate a QR code.
- Scan the QR code with your WhatsApp application.
- Once authenticated, the session is active and ready for messaging.
GET /qr
- Get QR code for authenticationGET /contact
- Fetch contact listGET /group
- Fetch group listPOST /connect
- Connect a WhatsApp sessionPOST /disconnect
- Disconnect and clear sessionPOST /message
- Send a messagePOST /status
- Update status message
Visit /documentation
to view the full API list via Swagger UI.
Contributions are welcome! Please feel free to submit issues or pull requests to improve this project.
If you find this project useful and would like to support further development, you can consider making a small contribution via Saweria: Saweria. Every bit of support is greatly appreciated!
This project is licensed under the MIT License.
Created by Azickri. If you find this project helpful, consider giving it a ⭐ on GitHub!