An implementation of @adiwajshing/Baileys as a simple API service with multiple device support.
- Download or clone this repo.
- Enter to the project directory.
- Execute
npm i
.
- Execute
npm run start
. - Now you can access the endpoint from
http://localhost:8000
.
This endpoint provide an UI to manage your devices.
This endpoint will return list of your personal chats.
Parameters
session
The session ID that already created.
This endpoint used to send a personal text message.
Parameters
sender
The session ID that already created.receiver
The receiver phone number in format:[country code without +][phone number]
. Example:6282314597xxx
.message
The message.
This endpoint will return list of your groups.
Parameters
session
The session ID that already created.
This endpoint used to create group.
Parameters
sender
The session ID that already created.name
The group name.members
List of numbers. Example:"5511999999999,5511988888888"
The server will respond in format:
{
success: true|false,
message: "",
groupId: {}
}
This endpoint used to send a text message to a group.
Parameters
sender
The session ID that already created.receiver
The group ID. Example:6282314597xxx-42674242
.message
The message.
The server will respond in format:
{
success: true|false,
message: "",
data: {}
}
This project is intended for learning purpose only, don't use this for spam or any activities that prohibited by WhatsApp.