Skip to content

Commit 1efe7f7

Browse files
committed
fix: readme
1 parent 5759341 commit 1efe7f7

6 files changed

Lines changed: 57 additions & 24 deletions

File tree

README.md

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
<h1 align="center">Evolution Api</h1>
2-
<!--
3-
</br>
4-
<hr style="height: 5px;background: #007500;margin: 20px 0;box-shadow: 0px 3px 5px 0px rgb(204 204 204);">-->
52

6-
<!-- <div align="center"> -->
3+
<div align="center">
74

8-
<!-- [![Telegram Group](https://img.shields.io/badge/Group-Telegram-%2333C1FF)](#)
9-
[![Whatsapp Group](https://img.shields.io/badge/Group-WhatsApp-%2322BC18)](#)
5+
<!-- [![Telegram Group](https://img.shields.io/badge/Group-Telegram-%2333C1FF)](#)-->
6+
<!-- [![Whatsapp Group](https://img.shields.io/badge/Group-WhatsApp-%2322BC18)](#) -->
107
[![License](https://img.shields.io/badge/license-GPL--3.0-orange)](./LICENSE)
11-
[![Support](https://img.shields.io/badge/Buy%20me-coffe-orange)](https://app.picpay.com/user/davidsongomes1998) -->
8+
[![Support](https://img.shields.io/badge/Buy%20me-coffe-orange)](https://app.picpay.com/user/davidsongomes1998)
129

13-
<!-- </div> -->
10+
</div>
1411

15-
<!-- <div align="center"><img src="./public/images/cover.png"></div>-> -->
12+
<div align="center"><img src="./public/images/cover.png"></div>
1613

1714
## WhatsApp-Api-NodeJs
1815

@@ -44,7 +41,7 @@ sudo usermod -aG docker ${USER}
4441
### Nodejs installation
4542

4643
```sh
47-
nvm install 16.17.0
44+
nvm install 16.18.1
4845
```
4946

5047
### pm2 installation
@@ -72,7 +69,7 @@ Using the database is optional.
7269

7370
Cloning the Repository
7471
```
75-
git clone https://github.com/code-chat-br/whatsapp-api.git
72+
git clone https://github.com/EvolutionAPI/evolution-api.git
7673
```
7774

7875
Go to the project directory and install all dependencies.</br>
@@ -91,7 +88,7 @@ npm run start
9188
npm run start:prod
9289

9390
# pm2
94-
pm2 start 'npm run start:prod' --name ApiCodechat
91+
pm2 start 'npm run start:prod' --name ApiEvolution
9592
```
9693
## Authentication
9794

@@ -121,7 +118,7 @@ Content-Type: application/json
121118
apikey: t8OOEeISKzpmc3jjcMqBWYSaJH2PIxns
122119
123120
{
124-
"instanceName": "codechat"
121+
"instanceName": "evolution"
125122
}
126123
```
127124
##### cURL
@@ -131,15 +128,15 @@ curl --location --request POST 'http://localhost:8080/instance/create' \
131128
--header 'Content-Type: application/json' \
132129
--header 'apikey: t8OOEeISKzpmc3jjcMqBWYSaJH2PIxns' \
133130
--data-raw '{
134-
"instanceName": "codechat"
131+
"instanceName": "evolution"
135132
}'
136133
```
137134
### Response
138135

139136
```ts
140137
{
141138
"instance": {
142-
"instanceName": "codechat",
139+
"instanceName": "evolution",
143140
"status": "created"
144141
},
145142
"hash": {
@@ -155,23 +152,23 @@ curl --location --request POST 'http://localhost:8080/instance/create' \
155152
##### HTTP
156153

157154
```http
158-
GET /instance/connect/codechat HTTP/1.1
155+
GET /instance/connect/evolution HTTP/1.1
159156
Host: localhost:8080
160157
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. [...]
161158
```
162159
```http
163-
GET /instance/connect/codechat HTTP/1.1
160+
GET /instance/connect/evolution HTTP/1.1
164161
Host: localhost:8080
165162
apikey: 88513847-1B0E-4188-8D76-4A2750C9B6C3
166163
```
167164
##### cURL
168165

169166
```bash
170-
curl --location --request GET 'http://localhost:8080/instance/connect/codechat' \
167+
curl --location --request GET 'http://localhost:8080/instance/connect/evolution' \
171168
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. [...]'
172169
```
173170
```bash
174-
curl --location --request GET 'http://localhost:8080/instance/connect/codechat' \
171+
curl --location --request GET 'http://localhost:8080/instance/connect/evolution' \
175172
--header 'apikey: 88513847-1B0E-4188-8D76-4A2750C9B6C3'
176173
```
177174

@@ -188,7 +185,7 @@ curl --location --request GET 'http://localhost:8080/instance/connect/codechat'
188185
- [docker run](./docker.sh)
189186
- [docker-compose](./docker-compose.yml)
190187
- [env for docker](./Docker/.env)
191-
- [DockerHub-codechat/api](https://hub.docker.com/r/codechat/api)
188+
- [DockerHub Evolution API](https://hub.docker.com/repository/docker/davidsongomes/evolution-api)
192189

193190
After building the application, in the same directory as the files above, run the following command:
194191
```sh
@@ -198,17 +195,17 @@ docker-compose up
198195
| | |
199196
|-----|---|
200197
| Send Text ||
201-
| Send Buttons ||
202198
| Send Template ||
203199
| Send Media: audio - video - image - document - gif <br></br>base64: ```true``` ||
204200
| Send Media File ||
205201
| Send Audio type WhatsApp ||
206202
| Send Location ||
207-
| Send List ||
208203
| Send Link Preview ||
209204
| Send Contact ||
210205
| Send Reaction - emoji ||
211206
| Send Poll Message ||
207+
| Send Buttons (Deprecated) ||
208+
| Send List (Deprecated) ||
212209

213210
## Postman collections
214211
- [Postman Json](./postman.json)
@@ -236,6 +233,29 @@ docker-compose up
236233
| GROUP_PARTICIPANTS_UPDATE | group-participants.update | JSON | Notifies when an action occurs involving a participant</br>'add' | 'remove' | 'promote' | 'demote' |
237234
| NEW_TOKEN | new.jwt | JSON | Notifies when the token (jwt) is updated
238235

236+
## Webhook Routes
237+
When enabling the WEBHOOK_BY_EVENTS options in the global and local webhooks, the following paths will be added at the end of the webhook.
238+
239+
| Name | Route |
240+
|------|-------|
241+
| APPLICATION_STARTUP | https://url_webhook/application-startup |
242+
| QRCODE_UPDATED | https://url_webhook/qrcode-updated |
243+
| CONNECTION_UPDATE | https://url_webhook/connection-update |
244+
| MESSAGES_SET | https://url_webhook/messages-set |
245+
| MESSAGES_UPSERT | https://url_webhook/messages-upsert |
246+
| MESSAGES_UPDATE | https://url_webhook/messages-update |
247+
| SEND_MESSAGE | https://url_webhook/send-message |
248+
| CONTACTS_SET | https://url_webhook/contacts-set |
249+
| CONTACTS_UPSERT | https://url_webhook/contacts-upsert |
250+
| CONTACTS_UPDATE | https://url_webhook/contacts-update |
251+
| PRESENCE_UPDATE | https://url_webhook/presence-update |
252+
| CHATS_SET | https://url_webhook/chats-set |
253+
| CHATS_UPDATE | https://url_webhook/chats-update |
254+
| CHATS_UPSERT | https://url_webhook/chats-upsert |
255+
| GROUPS_UPSERT | https://url_webhook/groups-upsert |
256+
| GROUPS_UPDATE | https://url_webhook/groups-update |
257+
| GROUP_PARTICIPANTS_UPDATE | https://url_webhook/groups-participants-update |
258+
| NEW_TOKEN | https://url_webhook/new-token |
239259
## Env File
240260

241261
See additional settings that can be applied through the **env** file by clicking **[here](./src/dev-env.yml)**.
@@ -254,8 +274,6 @@ This code was produced based on the baileys library and it is still under develo
254274

255275
# Donate to the project.
256276

257-
#### Pix: 2b526ada-4ef4-4db4-bbeb-f60da2421fce
258-
259277
#### PicPay
260278

261279
<div align="center">

docker.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
NET='evolution-net'
4+
IMAGE='evolution/api:local'
5+
6+
if !(docker network ls | grep ${NET} > /dev/null)
7+
then
8+
docker network create -d bridge ${NET}
9+
fi
10+
11+
sudo mkdir -p /data/instances
12+
13+
docker build -t ${IMAGE} .
14+
15+
docker run -d --restart 'always' --name 'evolution_api' --mount 'type=bind,source=/data/instances,target=/evolution/instances' --publish '8083:8083' --hostname 'evolution' --network ${NET} ${IMAGE}

public/images/code.png

-118 Bytes
Loading

public/images/codechat-logo.png

-103 KB
Loading

public/images/cover.png

-84 KB
Loading
-36.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)