An implementation of @adiwajshing/Baileys as a simple RESTful API service with multiple device support.
- Framework : Laravel 8
- Admin Panel : Crudbooster
- Backend Server : @ookamiiixd/baileys-api
- php 7.4
- MySQL / MariaDB
- NodeJs 14 or higher
- First clone or download this repository:
git clone https://github.com/saifulcoder/laravel-whatsapp-server.git
- Enter directory project
cd laravel-whatsapp-server
- Execute
composer install
to install the dependencies. - Setting the database configuration, rename
.env.example
to.env
and open file at project root directory
DB_DATABASE=**your_db_name**
DB_USERNAME=**your_db_user**
DB_PASSWORD=**password**
- Setting the URL backend server configuration, open
.env
file at project root directory
URL_WA_SERVER=http://localhost:8000
- Run Migration Database the following command at the terminal:
php artisan migrate:fresh --seed
or you can import db.sql
- Run laravel
php artisan serve --port=80
- Dashboard Admin
/admin/login
default email : [email protected]
default password : 123456
Simple RESTful WhatsApp API by @ookamiiixd/baileys-api .
- Enter to the baileys-api-master project directory
cd baileys-api-master
. - Execute
npm i
to install the dependencies. - You can start the app by executing
npm run start
ornode .
. - Now the endpoint should be available according to your environment variable settings. Default is at
http://localhost:8000
.
The API baileys-api-master documentation is available online at here. You can also import the Postman Collection File (postman_collection.json)
into your Postman App alternatively.
The server will respond in JSON format:
// Send text message
{
receiver: '628231xxxxx',
message: {
text: 'Hello there!'
}
}
// Send image
{
receiver: '628231xxxxx',
message: {
image: {
url: 'https://example.com/logo.png'
},
caption: 'My logo'
}
}
// Send video
{
receiver: '628231xxxxx',
message: {
video: {
url: 'https://example.com/intro.mp4'
},
caption: 'My intro'
}
}
// Send document
{
receiver: '628231xxxxx',
message: {
document: {
url: 'https://example.com/presentation.pdf'
},
mimetype: 'application/pdf',
fileName: 'presentation-1.pdf'
}
}
Multiple Device | ✔ |
📁 Send text | ✔ |
Admin Panel | ✔ |
Multiple Users | ✔ |
User Privilege | ✔ |
API RESTFul | ✔ |
📁 Send image, video, audio and docs | ✔ |
Send stickers | ✔ |
Send stickers GIF | ✔ |
Send Buttons | coming soon |
Send Bulk Message | coming soon |
Send Message with schedule | coming soon |
Receive message | coming soon |
Get Chat List | coming soon |
Get Chat Conversation | coming soon |
Webhook | coming soon |
This project helps you and you want to help keep it going? Buy me a coffee:
or via
https://saweria.co/saifulcoder