ookamiiixd/baileys-api
소개
여러 WhatsApp 연결을 지원하는 Baileys REST API 구현입니다.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original🚨 NOTICE:
@adiwajshing/baileyswhich is this project relied on, has been discontinued. Thus, this project will be archived and stopped receiving updates anymore. Thanks everyone who's been part of this❤️
Baileys API
An implementation of @adiwajshing/Baileys as a simple REST API with multiple device support
Requirements
- NodeJS version 14.5.0 or higher
- Prisma supported databases. Tested on MySQL and PostgreSQL
Installation
- Download or clone this repo. If you want to skip the build step, you can download the prebuilt one (file with the
baileys-api-VERSION.tgzname pattern) from the release page - Enter to the project directory
- Install the dependencies
npm install
- Build the project using the
buildscript
npm run build
You can skip this part if you're using the prebuilt one from the release page
Setup
- Copy the
.env.examplefile and rename it into.env, then update your connection url in theDATABASE_URLfield - Update your provider in the
prisma/schema.prismafile if you're using database other than MySQL - Run your migration
npx prisma migrate (dev|deploy)
or push the schema
npx prisma db push
Don't forget to always re-run those whenever there's a change on the prisma/schema.prisma file
.env Configurations
# Listening Host
HOST="localhost"
# Listening Port
PORT="3000"
# Database Connection URL
DATABASE_URL="mysql://root:12345@localhost:3306/baileys_api"
# Reconnect Interval (in Milliseconds)
RECONNECT_INTERVAL="5000"
# Maximum Reconnect Attempts
MAX_RECONNECT_RETRIES="5"
# Maximum SSE QR Generation Attempts
SSE_MAX_QR_GENERATION="10"
# Pino Logger Level
LOG_LEVEL="warn"
Usage
- Make sure you have completed the Installation and Setup step
- You can then start the app using the
startscript
npm run start
- Now the endpoint should be available according to your environment variables configuration. Default is at
http://localhost:3000
API Docs
The API documentation is available online here. You can also import the Postman Collection File (postman_collection.json) into your Postman App alternatively
Notes
- There's no authentication, you may want to implement your own. I don't want to force anyone into using a specific authentication method, choose whatever you love
Notice
This project is intended for learning purpose only, don't use it for spamming or any activities that's prohibited by WhatsApp
관련 프로젝트 살펴보기
불러오는 중…