1
1
<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);">-->
5
2
6
- <!-- < div align="center"> -- >
3
+ <div align =" center " >
7
4
8
- <!-- [](#)
9
- [](#)
5
+ <!-- [](#)-->
6
+ <!-- [](#) -->
10
7
[ ![ License] ( https://img.shields.io/badge/license-GPL--3.0-orange )] ( ./LICENSE )
11
- [](https://app.picpay.com/user/davidsongomes1998) -->
8
+ [ ![ Support] ( https://img.shields.io/badge/Buy%20me-coffe-orange )] ( https://app.picpay.com/user/davidsongomes1998 )
12
9
13
- <!-- < /div> -- >
10
+ </div >
14
11
15
- <!-- < div align="center"><img src="./public/images/cover.png"></div>-> -- >
12
+ <div align =" center " ><img src =" ./public/images/cover.png " ></div >
16
13
17
14
## WhatsApp-Api-NodeJs
18
15
19
- This project is based on the [ CodeChat] ( https://github.com/code-chat-br/whatsapp-api ) . The original project is an implementation of [ Baileys] ( https://github.com/adiwajshing /Baileys ) , serving as a Restful API service that controls WhatsApp functions.</br >
16
+ This project is based on the [ CodeChat] ( https://github.com/code-chat-br/whatsapp-api ) . The original project is an implementation of [ Baileys] ( https://github.com/WhiskeySockets /Baileys ) , serving as a Restful API service that controls WhatsApp functions.</br >
20
17
The code allows the creation of multiservice chats, service bots, or any other system that utilizes WhatsApp. The documentation provides instructions on how to set up and use the project, as well as additional information about its features and configuration options.
21
18
22
19
## Infrastructure
@@ -44,7 +41,7 @@ sudo usermod -aG docker ${USER}
44
41
### Nodejs installation
45
42
46
43
``` sh
47
- nvm install 16.17.0
44
+ nvm install 16.18.1
48
45
```
49
46
50
47
### pm2 installation
@@ -72,7 +69,7 @@ Using the database is optional.
72
69
73
70
Cloning the Repository
74
71
```
75
- git clone https://github.com/code-chat-br/whatsapp -api.git
72
+ git clone https://github.com/EvolutionAPI/evolution -api.git
76
73
```
77
74
78
75
Go to the project directory and install all dependencies.</br >
@@ -91,7 +88,7 @@ npm run start
91
88
npm run start:prod
92
89
93
90
# pm2
94
- pm2 start ' npm run start:prod' --name ApiCodechat
91
+ pm2 start ' npm run start:prod' --name ApiEvolution
95
92
```
96
93
## Authentication
97
94
@@ -121,7 +118,7 @@ Content-Type: application/json
121
118
apikey: t8OOEeISKzpmc3jjcMqBWYSaJH2PIxns
122
119
123
120
{
124
- "instanceName": "codechat "
121
+ "instanceName": "evolution "
125
122
}
126
123
```
127
124
##### cURL
@@ -131,15 +128,15 @@ curl --location --request POST 'http://localhost:8080/instance/create' \
131
128
--header ' Content-Type: application/json' \
132
129
--header ' apikey: t8OOEeISKzpmc3jjcMqBWYSaJH2PIxns' \
133
130
--data-raw ' {
134
- "instanceName": "codechat "
131
+ "instanceName": "evolution "
135
132
}'
136
133
```
137
134
### Response
138
135
139
136
``` ts
140
137
{
141
138
" instance" : {
142
- " instanceName" : " codechat " ,
139
+ " instanceName" : " evolution " ,
143
140
" status" : " created"
144
141
},
145
142
" hash" : {
@@ -155,23 +152,23 @@ curl --location --request POST 'http://localhost:8080/instance/create' \
155
152
##### HTTP
156
153
157
154
``` http
158
- GET /instance/connect/codechat HTTP/1.1
155
+ GET /instance/connect/evolution HTTP/1.1
159
156
Host: localhost:8080
160
157
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. [...]
161
158
```
162
159
``` http
163
- GET /instance/connect/codechat HTTP/1.1
160
+ GET /instance/connect/evolution HTTP/1.1
164
161
Host: localhost:8080
165
162
apikey: 88513847-1B0E-4188-8D76-4A2750C9B6C3
166
163
```
167
164
##### cURL
168
165
169
166
``` bash
170
- curl --location --request GET ' http://localhost:8080/instance/connect/codechat ' \
167
+ curl --location --request GET ' http://localhost:8080/instance/connect/evolution ' \
171
168
--header ' Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. [...]'
172
169
```
173
170
``` bash
174
- curl --location --request GET ' http://localhost:8080/instance/connect/codechat ' \
171
+ curl --location --request GET ' http://localhost:8080/instance/connect/evolution ' \
175
172
--header ' apikey: 88513847-1B0E-4188-8D76-4A2750C9B6C3'
176
173
```
177
174
@@ -188,7 +185,7 @@ curl --location --request GET 'http://localhost:8080/instance/connect/codechat'
188
185
- [ docker run] ( ./docker.sh )
189
186
- [ docker-compose] ( ./docker-compose.yml )
190
187
- [ 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 )
192
189
193
190
After building the application, in the same directory as the files above, run the following command:
194
191
``` sh
@@ -198,17 +195,17 @@ docker-compose up
198
195
| | |
199
196
| -----| ---|
200
197
| Send Text | ✔ |
201
- | Send Buttons | ✔ |
202
198
| Send Template | ❌ |
203
199
| Send Media: audio - video - image - document - gif <br ></br >base64: ``` true ``` | ✔ |
204
200
| Send Media File | ❌ |
205
201
| Send Audio type WhatsApp | ✔ |
206
202
| Send Location | ✔ |
207
- | Send List | ✔ |
208
203
| Send Link Preview | ✔ |
209
204
| Send Contact | ✔ |
210
205
| Send Reaction - emoji | ✔ |
211
206
| Send Poll Message | ✔ |
207
+ | Send Buttons (Deprecated) | ❌ |
208
+ | Send List (Deprecated) | ❌ |
212
209
213
210
## Postman collections
214
211
- [ Postman Json] ( ./postman.json )
@@ -236,6 +233,33 @@ docker-compose up
236
233
| GROUP_PARTICIPANTS_UPDATE | group-participants.update | JSON | Notifies when an action occurs involving a participant</br >'add' | 'remove' | 'promote' | 'demote' |
237
234
| NEW_TOKEN | new.jwt | JSON | Notifies when the token (jwt) is updated
238
235
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
+ <br ><br >
239
+ Example:
240
+
241
+ https://sub.domain.com/webhook-test/exclusive-webhook-code/qrcode-updated
242
+
243
+ | Name | Path |
244
+ | ------| -------|
245
+ | APPLICATION_STARTUP | /application-startup |
246
+ | QRCODE_UPDATED | /qrcode-updated |
247
+ | CONNECTION_UPDATE | /connection-update |
248
+ | MESSAGES_SET | /messages-set |
249
+ | MESSAGES_UPSERT | /messages-upsert |
250
+ | MESSAGES_UPDATE | /messages-update |
251
+ | SEND_MESSAGE | /send-message |
252
+ | CONTACTS_SET | /contacts-set |
253
+ | CONTACTS_UPSERT | /contacts-upsert |
254
+ | CONTACTS_UPDATE | /contacts-update |
255
+ | PRESENCE_UPDATE | /presence-update |
256
+ | CHATS_SET | /chats-set |
257
+ | CHATS_UPDATE | /chats-update |
258
+ | CHATS_UPSERT | /chats-upsert |
259
+ | GROUPS_UPSERT | /groups-upsert |
260
+ | GROUPS_UPDATE | /groups-update |
261
+ | GROUP_PARTICIPANTS_UPDATE | /groups-participants-update |
262
+ | NEW_TOKEN | /new-token |
239
263
## Env File
240
264
241
265
See additional settings that can be applied through the ** env** file by clicking ** [ here] ( ./src/dev-env.yml ) ** .
@@ -254,8 +278,6 @@ This code was produced based on the baileys library and it is still under develo
254
278
255
279
# Donate to the project.
256
280
257
- #### Pix: 2b526ada-4ef4-4db4-bbeb-f60da2421fce
258
-
259
281
#### PicPay
260
282
261
283
<div align =" center " >
0 commit comments