Go WhatsApp Multi-Device Implementation in REST API with Multi-Session/Account Support
MIT License
This repository contains example of implementation go.mau.fi/whatsmeow package with Multi-Session/Account Support. This example is using a labstack/echo version 4.x.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment section for notes on how to deploy the project on a live system.
Prequisites packages:
Optional packages:
Install Docker CE based on the manual documentation
Run the following command on your Terminal or PowerShell
docker run -d \
-p 3000:3000 \
--name go-whatsapp-multidevice \
--rm dimaskiddo/go-whatsapp-multidevice-rest:latest
Now it should be accessible in your machine by accessing localhost:3000/api/v1/whatsapp
or 127.0.0.1:3000/api/v1/whatsapp
Try to use integrated API docs that accesible in localhost:3000/api/v1/whatsapp/docs/
or 127.0.0.1:3000/api/v1/whatsapp/docs/
Download Pre-Build Binaries from the release page
Extract the zipped file
Copy the .env.default
file as .env
file
Run the pre-build binary
# MacOS / Linux
chmod 755 go-whatsapp-multidevice-rest
./go-whatsapp-multidevice-rest
# Windows
# You can double click it or using PowerShell
.\go-whatsapp-multidevice-rest.exe
Now it should be accessible in your machine by accessing localhost:3000/api/v1/whatsapp
or 127.0.0.1:3000/api/v1/whatsapp
Try to use integrated API docs that accesible in localhost:3000/api/v1/whatsapp/docs/
or 127.0.0.1:3000/api/v1/whatsapp/docs/
Below is the instructions to make this source code running:
cd <your_go_workspace_directory>
export GOPATH=$GOPATH:"`pwd`"
mkdir -p src/github.com/dimaskiddo/go-whatsapp-multidevice-rest
cd src/github.com/dimaskiddo/go-whatsapp-multidevice-rest
git clone -b master https://github.com/dimaskiddo/go-whatsapp-multidevice-rest.git .
make vendor
ln -sf .env.development .env
# - OR -
cp .env.development .env
make run
make build
make release
Now it should be accessible in your machine by accessing localhost:3000/api/v1/whatsapp
or 127.0.0.1:3000/api/v1/whatsapp
Try to use integrated API docs that accesible in localhost:3000/api/v1/whatsapp/docs/
or 127.0.0.1:3000/api/v1/whatsapp/docs/
You can access any endpoint under HTTP_BASE_URL environment variable which by default located at .env
file.
Integrated API Documentation can be accessed in <HTTP_BASE_URL>/docs/
or by default it's in localhost:3000/api/v1/whatsapp/docs/
or 127.0.0.1:3000/api/v1/whatsapp/docs/
Currently the test is not ready yet :)
See also the list of contributors who participated in this project
You can seek more information for the make command parameters in the Makefile
Copyright (C) 2022 Dimas Restu Hidayanto
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.