Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e427a0a34 | ||
|
|
40c5e95d93 | ||
|
|
ab70e27266 | ||
|
|
301b6f57d3 | ||
|
|
4c9f5ed907 | ||
|
|
04d65150ed | ||
|
|
d29165c9a5 | ||
|
|
30db175d52 |
No files matched your search
@@ -22,7 +22,6 @@ jobs:
|
||||
images: ${{ secrets.DOCKER_IMAGE }}
|
||||
flavor: latest=false
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=raw,value=latest
|
||||
|
||||
- name: Login to image repository
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.6.1.cjs
|
||||
yarnPath: .yarn/releases/yarn-3.6.3.cjs
|
||||
+1
-1
@@ -8,7 +8,7 @@ ENV PUPPETEER_SKIP_DOWNLOAD=True
|
||||
WORKDIR /src
|
||||
COPY package.json .
|
||||
COPY yarn.lock .
|
||||
RUN yarn set version 3.6.1
|
||||
RUN yarn set version 3.6.3
|
||||
RUN yarn install
|
||||
|
||||
# App
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
- Receive messages
|
||||
- Message replies
|
||||
- Send location
|
||||
- Send buttons
|
||||
- Receive location
|
||||
- React to messages
|
||||
- Send media (images/documents/files)
|
||||
@@ -110,7 +109,7 @@ docker pull devlikeapro/whatsapp-http-api
|
||||
 For Plus version, we use login to get the image before:
|
||||
|
||||
```bash
|
||||
docker login -u devlikeapro -p {PASSWORD}
|
||||
docker login -u devlikeapro -p {KEY}
|
||||
docker pull devlikeapro/whatsapp-http-api-plus
|
||||
docker logout
|
||||
```
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
---
|
||||
title : "Install"
|
||||
description: "How to install and update WAHA"
|
||||
lead: ""
|
||||
date: 2020-10-06T08:48:45+00:00
|
||||
lastmod: 2020-10-06T08:48:45+00:00
|
||||
draft: false
|
||||
images: []
|
||||
weight: 109
|
||||
---
|
||||
|
||||
On the page you'll find answers on how to install WAHA.
|
||||
|
||||
If you wish to read a quick start guide which show you how to send you first message via HTTP API
|
||||
please go to [**Quick Start ->**]({{< relref "/docs/overview/quick-start" >}}).
|
||||
|
||||
WAHA is distributed in two versions, that have a similar installation instructions.
|
||||
- WAHA Core  - the basic version that meet almost 80% people's needs. 100% free and [open source ->](https://github.com/devlikeapro/whatsapp-http-api).
|
||||
- WAHA Plus  - the version with advanced messages, security, and reliability features. Donations, no license expiration, quick updates, read more about [Plus Version →]({{< relref "plus-version" >}})
|
||||
|
||||
## Requirements
|
||||
|
||||
Only thing that you must have - installed docker. Please follow the original
|
||||
instruction <a href="https://docs.docker.com/get-docker/" target="_blank" rel="noopener">how to install docker -></a>.
|
||||
|
||||
{{< details "Why Docker?" >}}
|
||||
Docker makes it easy to ship all-in-one solution with the runtime and dependencies. You don't have to worry about
|
||||
language-specific libraries or chrome installation.
|
||||
|
||||
Also, Docker makes installation and update processes so simple, just one command!
|
||||
{{< /details >}}
|
||||
|
||||
## WAHA Core
|
||||
Download the image:
|
||||
```bash
|
||||
docker pull devlikeapro/whatsapp-http-api
|
||||
```
|
||||
|
||||
Run the container:
|
||||
```bash
|
||||
docker run -it -p 3000:3000/tcp devlikeapro/whatsapp-http-api
|
||||
```
|
||||
|
||||
Open API documentation [http://localhost:3000](http://localhost:3000).
|
||||
|
||||
## WAHA Plus
|
||||
Before installing WAHA Plus version you need to get a key, `{KEY}` in below commands, in format `dckr_pat_1111`
|
||||
|
||||
We distribute the key via two platforms (Boosty and Patreon) and you'll find the active key **in the latest post**.
|
||||
Keep in mind that we publish new key every month, so you must get the latest active key in order to download
|
||||
the latest image.
|
||||
|
||||
Read more about [**Plus Version →**]({{< relref "plus-version" >}})
|
||||
|
||||
{{< alert icon="👉" text="Subscribe as **PRO** level and get your personal key which won't expire every month while you're supporting the project" />}}
|
||||
|
||||
Download the image:
|
||||
```bash
|
||||
docker login -u devlikeapro -p {KEY}
|
||||
docker pull devlikeapro/whatsapp-http-api-plus
|
||||
docker logout
|
||||
```
|
||||
|
||||
Run the container:
|
||||
```bash
|
||||
docker run -it -p 3000:3000/tcp devlikeapro/whatsapp-http-api-plus
|
||||
```
|
||||
|
||||
Open API documentation [http://localhost:3000](http://localhost:3000).
|
||||
|
||||
## ARM
|
||||
If you’re using **ARM** processor (like Apple Silicon, Apple M1, etc.) - add `:arm` tag at the end of the image name in the above commands.
|
||||
- **WAHA Core** - `devlikeapro/whatsapp-http-api:arm`
|
||||
- **WAHA Plus** - `devlikeapro/whatsapp-http-api-plus:arm`
|
||||
|
||||
You can also rename the image after you downloaded it with `docker tag` command,
|
||||
so you can use the same image names in commands:
|
||||
```bash
|
||||
# Rename WAHA Core ARM
|
||||
docker tag devlikeapro/whatsapp-http-api:arm devlikeapro/whatsapp-http-api
|
||||
|
||||
# Rename WAHA Plus ARM
|
||||
docker tag devlikeapro/whatsapp-http-api-plus:arm devlikeapro/whatsapp-http-api-plus
|
||||
```
|
||||
|
||||
|
||||
## Update WAHA
|
||||
{{< alert icon="💡" text="Please test all new versions in the development environment before updating production!" />}}
|
||||
|
||||
The commands are the same as for downloading, expected you need to restart **all working containers** after you download new image.
|
||||
|
||||
**WAHA Core** - download new image
|
||||
```bash
|
||||
# Download the image
|
||||
docker pull devlikeapro/whatsapp-http-api
|
||||
|
||||
# Restart all containers
|
||||
docker stop whatsapp-http-api
|
||||
docker rm whatsapp-http-api
|
||||
docker run -it --rm -p 3000:3000/tcp --name whatsapp-http-api devlikeapro/whatsapp-http-api
|
||||
```
|
||||
|
||||
**WAHA Plus** - download new image (please use **the latest key** from Boosty or Patreon)
|
||||
```bash
|
||||
# Download the image
|
||||
docker login -u devlikeapro -p {KEY}
|
||||
docker pull devlikeapro/whatsapp-http-api-plus
|
||||
docker logout
|
||||
docker stop whatsapp-http-api
|
||||
|
||||
# Restart all containers
|
||||
docker stop whatsapp-http-api
|
||||
docker rm whatsapp-http-api
|
||||
docker run -it --rm -p 3000:3000/tcp --name whatsapp-http-api devlikeapro/whatsapp-http-api
|
||||
```
|
||||
@@ -86,6 +86,7 @@ Here's available tiers for our supporters:
|
||||
| Access to WAHA Plus  docker image. | ✔️ | ✔️ | ✔️ |
|
||||
| An invitation to a private Github repository so you have the WAHA Plus source code. | ➖️ | ✔️ | ✔️️ |
|
||||
| Access to a Telegram group where we provide support and assistance. | ➖️ | ➖ | ✔️ |
|
||||
| Personal key to Docker Hub. | ➖️ | ➖ | ✔️ |
|
||||
| **Donation** | **$19** | **$39** | **$99** |
|
||||
|
||||
For **$19** donation you get:
|
||||
@@ -131,7 +132,7 @@ Go ahead and get your own WhatsApp HTTP API!
|
||||
### Install Plus
|
||||
After you get the password, use it to login and download docker image:
|
||||
```bash
|
||||
docker login -u devlikeapro -p {PASSWORD}
|
||||
docker login -u devlikeapro -p {KEY}
|
||||
docker pull devlikeapro/whatsapp-http-api-plus
|
||||
docker logout
|
||||
```
|
||||
|
||||
@@ -75,7 +75,7 @@ To reply on a message - use `POST /api/reply` with example payload.
|
||||
```
|
||||
|
||||
#### Reply files 
|
||||
WAHA does not support reply with files (images, voice, etc). If you're interested in it - please create an issue in GitHub.
|
||||
WAHA does not support reply with files (images, voice, etc.). If you're interested in it - please create an issue in GitHub.
|
||||
|
||||
### Add a reaction
|
||||
Use `PUT /api/reaction` method to set reaction to a message.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Changelog"
|
||||
description: "WAHA's changelog"
|
||||
lead: "Changelog"
|
||||
lead: "You can find here the list of changes made to WAHA."
|
||||
date: 2020-10-06T08:49:31+00:00
|
||||
lastmod: 2020-10-06T08:49:31+00:00
|
||||
draft: false
|
||||
@@ -12,6 +12,13 @@ menu:
|
||||
weight: 199
|
||||
toc: true
|
||||
---
|
||||
|
||||
If you wish to get and read Release Notes - read them on one of our platforms, **these posts are FREE**.
|
||||
- [**Boosty ->**](https://boosty.to/wa-http-api)
|
||||
- [**Patreon ->**](patreon.com/wa_http_api)
|
||||
|
||||
You even can **subscribe to get new updates** there!
|
||||
|
||||
## 2023.9
|
||||
September 2023
|
||||
- Add `GET /api/sessions/{session/me` endpoint so you [can get the phone number associated with the session](https://waha.devlike.pro/docs/how-to/sessions/#get-me)
|
||||
|
||||
@@ -13,26 +13,6 @@ weight: 130
|
||||
toc: true
|
||||
---
|
||||
|
||||
## How to update?
|
||||
|
||||
{{< alert icon="💡" text="Please test all new versions in the development environment before updating production!" />}}
|
||||
|
||||
 For **Core** version the command is
|
||||
|
||||
```bash
|
||||
docker pull devlikeapro/whatsapp-http-api
|
||||
```
|
||||
|
||||
 For **Plus** version, we use login to get the image before:
|
||||
|
||||
```bash
|
||||
docker login -u devlikeapro -p {PASSWORD}
|
||||
docker pull devlikeapro/whatsapp-http-api-plus
|
||||
docker logout
|
||||
```
|
||||
|
||||
Read more about how to get `PASSWORD` for [Plus Version →]({{< relref "plus-version" >}})
|
||||
|
||||
## How much CPU and Memory does WhatsApp HTTP API consume?
|
||||
|
||||
The benchmark has been made on **Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz**.
|
||||
|
||||
@@ -37,7 +37,6 @@ Here's the available features:
|
||||
- Receive messages
|
||||
- Message replies
|
||||
- Send location
|
||||
- Send buttons
|
||||
- Receive location
|
||||
- React to messages
|
||||
- Send media (images/documents/files) 
|
||||
|
||||
@@ -29,7 +29,7 @@ When you are ready - come back and follows the below steps to send the first tex
|
||||
Docker makes it easy to ship all-in-one solution with the runtime and dependencies. You don't have to worry about
|
||||
language-specific libraries or chrome installation.
|
||||
|
||||
Also Docker makes installation and update processes so simple, just one command!
|
||||
Also, Docker makes installation and update processes so simple, just one command!
|
||||
{{< /details >}}
|
||||
|
||||
## Send your first message
|
||||
@@ -63,7 +63,7 @@ docker pull devlikeapro/whatsapp-http-api
|
||||
 For Plus version, we use login to get the image before:
|
||||
|
||||
```bash
|
||||
docker login -u devlikeapro -p {PASSWORD}
|
||||
docker login -u devlikeapro -p {KEY}
|
||||
docker pull devlikeapro/whatsapp-http-api-plus
|
||||
docker logout
|
||||
```
|
||||
@@ -72,7 +72,7 @@ Read more about how to get `PASSWORD` for [Plus Version →]({{< relref "plus-ve
|
||||
|
||||
#### 1.1 Download image on ARM
|
||||
|
||||
If you're using ARM (like Apple Silicon, Apple M1, etc) - use following commands to download the image
|
||||
If you're using ARM (like Apple Silicon, Apple M1, etc.) - use following commands to download the image
|
||||
|
||||
 For Core version the command is
|
||||
```bash
|
||||
@@ -84,12 +84,12 @@ docker tag devlikeapro/whatsapp-http-api:arm devlikeapro/whatsapp-http-api
|
||||
|
||||
 For Plus version the command is:
|
||||
```bash
|
||||
docker login -u devlikeapro -p {PASSWORD}
|
||||
docker login -u devlikeapro -p {KEY}
|
||||
docker pull devlikeapro/whatsapp-http-api-plus:arm
|
||||
docker logout
|
||||
|
||||
# Rename it, so you can use devlikeapro/whatsapp-http-api image in other place
|
||||
docker tag devlikeapro/whatsapp-http-api-plus:arm devlikeapro/whatsapp-http-api
|
||||
docker tag devlikeapro/whatsapp-http-api-plus:arm devlikeapro/whatsapp-http-api-plus
|
||||
```
|
||||
|
||||
### 2. Run WhatsApp HTTP API
|
||||
|
||||
@@ -28,7 +28,7 @@ docker run -it --rm --network=host -e WHATSAPP_HOOK_URL=http://localhost:5000/bo
|
||||
|
||||
#### Download image - ARM
|
||||
|
||||
If you're using ARM (like Apple Silicon, Apple M1, etc) - use following commands to download the image
|
||||
If you're using ARM (like Apple Silicon, Apple M1, etc.) - use following commands to download the image
|
||||
|
||||
 For Core version the command is
|
||||
```bash
|
||||
|
||||
+2
-2
@@ -53,7 +53,7 @@
|
||||
"rxjs": "^7.1.0",
|
||||
"swagger-ui-express": "^4.1.4",
|
||||
"venom-bot": "5.0.1",
|
||||
"whatsapp-web.js": "https://github.com/pedroslopez/whatsapp-web.js"
|
||||
"whatsapp-web.js": "https://github.com/elhumbertoz/whatsapp-web.js#patch-2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "^9.0.0",
|
||||
@@ -92,5 +92,5 @@
|
||||
"coverageDirectory": "../coverage",
|
||||
"testEnvironment": "node"
|
||||
},
|
||||
"packageManager": "yarn@3.6.0"
|
||||
"packageManager": "yarn@3.6.3"
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import {
|
||||
MessagePollRequest,
|
||||
MessageReactionRequest,
|
||||
MessageReplyRequest,
|
||||
MessageTextButtonsRequest,
|
||||
MessageTextQuery,
|
||||
MessageTextRequest,
|
||||
MessageVoiceRequest,
|
||||
@@ -61,15 +60,10 @@ export class ChattingController {
|
||||
return whatsapp.sendText(request);
|
||||
}
|
||||
|
||||
@Post('/sendTextButtons')
|
||||
@ApiOperation({ summary: 'Send a text message with buttons' })
|
||||
sendTextButtons(@Body() request: MessageTextButtonsRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.sendTextButtons(request);
|
||||
}
|
||||
|
||||
@Post('/sendPoll')
|
||||
@ApiOperation({ summary: 'Send a poll with options' })
|
||||
@ApiOperation({
|
||||
summary: 'Send a poll with options. You can use it as buttons replace',
|
||||
})
|
||||
sendPoll(@Body() request: MessagePollRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.sendPoll(request);
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
MessagePollRequest,
|
||||
MessageReactionRequest,
|
||||
MessageReplyRequest,
|
||||
MessageTextButtonsRequest,
|
||||
MessageTextRequest,
|
||||
MessageVoiceRequest,
|
||||
} from '../../structures/chatting.dto';
|
||||
@@ -185,8 +184,6 @@ export abstract class WhatsappSession {
|
||||
|
||||
abstract sendContactVCard(request: MessageContactVcardRequest);
|
||||
|
||||
abstract sendTextButtons(request: MessageTextButtonsRequest);
|
||||
|
||||
sendPoll(request: MessagePollRequest) {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import { Message } from 'whatsapp-web.js';
|
||||
|
||||
import { flipObject, splitAt } from '../helpers';
|
||||
import {
|
||||
Button,
|
||||
ChatRequest,
|
||||
CheckNumberStatusQuery,
|
||||
MessageContactVcardRequest,
|
||||
@@ -35,7 +34,6 @@ import {
|
||||
MessagePollRequest,
|
||||
MessageReactionRequest,
|
||||
MessageReplyRequest,
|
||||
MessageTextButtonsRequest,
|
||||
MessageTextRequest,
|
||||
MessageVoiceRequest,
|
||||
SendSeenRequest,
|
||||
@@ -333,24 +331,6 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
return this.sock.sendMessage(chatId, message);
|
||||
}
|
||||
|
||||
sendTextButtons(request: MessageTextButtonsRequest) {
|
||||
const buttons = request.buttons.map((button: Button) => {
|
||||
return {
|
||||
buttonId: button.id,
|
||||
buttonText: { displayText: button.text },
|
||||
type: 1,
|
||||
};
|
||||
});
|
||||
|
||||
const buttonMessage = {
|
||||
text: request.title,
|
||||
buttons: buttons,
|
||||
headerType: 1,
|
||||
};
|
||||
|
||||
return this.sock.sendMessage(request.chatId, buttonMessage);
|
||||
}
|
||||
|
||||
async sendPoll(request: MessagePollRequest) {
|
||||
const requestPoll = request.poll;
|
||||
const poll = {
|
||||
|
||||
@@ -2,7 +2,6 @@ import { UnprocessableEntityException } from '@nestjs/common/exceptions/unproces
|
||||
import { create, CreateConfig, Message, Whatsapp } from 'venom-bot';
|
||||
|
||||
import {
|
||||
Button,
|
||||
ChatRequest,
|
||||
CheckNumberStatusQuery,
|
||||
GetMessageQuery,
|
||||
@@ -13,7 +12,6 @@ import {
|
||||
MessageLocationRequest,
|
||||
MessageReactionRequest,
|
||||
MessageReplyRequest,
|
||||
MessageTextButtonsRequest,
|
||||
MessageTextRequest,
|
||||
WANumberExistResult,
|
||||
} from '../structures/chatting.dto';
|
||||
@@ -202,23 +200,6 @@ export class WhatsappSessionVenomCore extends WhatsappSession {
|
||||
return this.whatsapp.markMarkSeenMessage(chat.chatId);
|
||||
}
|
||||
|
||||
sendTextButtons(request: MessageTextButtonsRequest) {
|
||||
const buttons = request.buttons.map((button: Button) => {
|
||||
return {
|
||||
buttonId: button.id,
|
||||
buttonText: {
|
||||
displayText: button.text,
|
||||
},
|
||||
};
|
||||
});
|
||||
return this.whatsapp.sendButtons(
|
||||
this.ensureSuffix(request.chatId),
|
||||
request.title,
|
||||
request.footer,
|
||||
buttons,
|
||||
);
|
||||
}
|
||||
|
||||
startTyping(chat: ChatRequest) {
|
||||
return this.whatsapp.startTyping(chat.chatId, false);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { UnprocessableEntityException } from '@nestjs/common/exceptions/unprocessable-entity.exception';
|
||||
import {
|
||||
Buttons,
|
||||
Chat,
|
||||
Client,
|
||||
ClientOptions,
|
||||
@@ -13,7 +12,6 @@ import {
|
||||
import { Message as MessageInstance } from 'whatsapp-web.js/src/structures';
|
||||
|
||||
import {
|
||||
Button,
|
||||
ChatRequest,
|
||||
CheckNumberStatusQuery,
|
||||
GetMessageQuery,
|
||||
@@ -24,7 +22,6 @@ import {
|
||||
MessageLocationRequest,
|
||||
MessageReactionRequest,
|
||||
MessageReplyRequest,
|
||||
MessageTextButtonsRequest,
|
||||
MessageTextRequest,
|
||||
MessageVoiceRequest,
|
||||
SendSeenRequest,
|
||||
@@ -188,20 +185,6 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
);
|
||||
}
|
||||
|
||||
sendTextButtons(request: MessageTextButtonsRequest) {
|
||||
const buttons = request.buttons.map((button: Button) => {
|
||||
return {
|
||||
id: button.id,
|
||||
body: button.text,
|
||||
};
|
||||
});
|
||||
const message = new Buttons('', buttons, request.title, request.footer);
|
||||
return this.whatsapp.sendMessage(
|
||||
this.ensureSuffix(request.chatId),
|
||||
message,
|
||||
);
|
||||
}
|
||||
|
||||
sendContactVCard(request: MessageContactVcardRequest) {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
@@ -92,17 +92,6 @@ export class MessageTextRequest extends ChatRequest {
|
||||
mentions?: string[];
|
||||
}
|
||||
|
||||
export class Button {
|
||||
id: string;
|
||||
text: string;
|
||||
}
|
||||
|
||||
export class MessageTextButtonsRequest extends ChatRequest {
|
||||
title: string;
|
||||
footer?: string;
|
||||
buttons?: Array<Button>;
|
||||
}
|
||||
|
||||
export class MessageReplyRequest extends MessageTextRequest {
|
||||
text = 'Reply text';
|
||||
@ApiProperty({
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ export function getWAHAVersion(): WAHAVersion {
|
||||
}
|
||||
|
||||
export const VERSION = {
|
||||
version: '2023.9.3',
|
||||
version: '2023.9.7',
|
||||
tier: getWAHAVersion(),
|
||||
browser: getBrowserExecutablePath(),
|
||||
};
|
||||
Reference in new issue
Block a user