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- <!-- [](#)
9- [](#)
5+ <!-- [](#)-->
6+ <!-- [](#) -->
107[ ![ 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 )
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
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 >
2017The 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.
2118
2219## Infrastructure
@@ -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
7370Cloning 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
7875Go to the project directory and install all dependencies.</br >
@@ -91,7 +88,7 @@ npm run start
9188npm 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
121118apikey: 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
159156Host: localhost:8080
160157Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. [...]
161158```
162159``` http
163- GET /instance/connect/codechat HTTP/1.1
160+ GET /instance/connect/evolution HTTP/1.1
164161Host: localhost:8080
165162apikey: 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
193190After 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,33 @@ 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+ <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 |
239263## Env File
240264
241265See 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
254278
255279# Donate to the project.
256280
257- #### Pix: 2b526ada-4ef4-4db4-bbeb-f60da2421fce
258-
259281#### PicPay
260282
261283<div align =" center " >
0 commit comments