mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 19:32:21 -06:00
fix: readme
This commit is contained in:
66
README.md
66
README.md
@@ -1,18 +1,15 @@
|
||||
<h1 align="center">Evolution Api</h1>
|
||||
<!--
|
||||
</br>
|
||||
<hr style="height: 5px;background: #007500;margin: 20px 0;box-shadow: 0px 3px 5px 0px rgb(204 204 204);">-->
|
||||
|
||||
<!-- <div align="center"> -->
|
||||
<div align="center">
|
||||
|
||||
<!-- [](#)
|
||||
[](#)
|
||||
<!-- [](#)-->
|
||||
<!-- [](#) -->
|
||||
[](./LICENSE)
|
||||
[](https://app.picpay.com/user/davidsongomes1998) -->
|
||||
[](https://app.picpay.com/user/davidsongomes1998)
|
||||
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
<!-- <div align="center"><img src="./public/images/cover.png"></div>-> -->
|
||||
<div align="center"><img src="./public/images/cover.png"></div>
|
||||
|
||||
## WhatsApp-Api-NodeJs
|
||||
|
||||
@@ -44,7 +41,7 @@ sudo usermod -aG docker ${USER}
|
||||
### Nodejs installation
|
||||
|
||||
```sh
|
||||
nvm install 16.17.0
|
||||
nvm install 16.18.1
|
||||
```
|
||||
|
||||
### pm2 installation
|
||||
@@ -72,7 +69,7 @@ Using the database is optional.
|
||||
|
||||
Cloning the Repository
|
||||
```
|
||||
git clone https://github.com/code-chat-br/whatsapp-api.git
|
||||
git clone https://github.com/EvolutionAPI/evolution-api.git
|
||||
```
|
||||
|
||||
Go to the project directory and install all dependencies.</br>
|
||||
@@ -91,7 +88,7 @@ npm run start
|
||||
npm run start:prod
|
||||
|
||||
# pm2
|
||||
pm2 start 'npm run start:prod' --name ApiCodechat
|
||||
pm2 start 'npm run start:prod' --name ApiEvolution
|
||||
```
|
||||
## Authentication
|
||||
|
||||
@@ -121,7 +118,7 @@ Content-Type: application/json
|
||||
apikey: t8OOEeISKzpmc3jjcMqBWYSaJH2PIxns
|
||||
|
||||
```
|
||||
##### cURL
|
||||
##### cURL
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'http://localhost:8080/instance/create' \
|
||||
@@ -131,7 +128,7 @@ curl --location --request POST 'http://localhost:8080/instance/create' \
|
||||
"instanceName": "evolution"
|
||||
}'
|
||||
```
|
||||
### Response
|
||||
### Response
|
||||
|
||||
```ts
|
||||
{
|
||||
@@ -139,7 +136,7 @@ curl --location --request POST 'http://localhost:8080/instance/create' \
|
||||
"instanceName": "evolution",
|
||||
"status": "created"
|
||||
},
|
||||
"hash": {
|
||||
"hash": {
|
||||
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. [...]"
|
||||
|
||||
// or
|
||||
@@ -155,23 +152,23 @@ curl --location --request POST 'http://localhost:8080/instance/create' \
|
||||
GET /instance/connect/evolution HTTP/1.1
|
||||
Host: localhost:8080
|
||||
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. [...]
|
||||
```
|
||||
```
|
||||
```http
|
||||
GET /instance/connect/evolution HTTP/1.1
|
||||
Host: localhost:8080
|
||||
apikey: 88513847-1B0E-4188-8D76-4A2750C9B6C3
|
||||
```
|
||||
```
|
||||
##### cURL
|
||||
|
||||
```bash
|
||||
curl --location --request GET 'http://localhost:8080/instance/connect/evolution' \
|
||||
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. [...]'
|
||||
```
|
||||
```bash
|
||||
```bash
|
||||
curl --location --request GET 'http://localhost:8080/instance/connect/evolution' \
|
||||
--header 'apikey: 88513847-1B0E-4188-8D76-4A2750C9B6C3'
|
||||
```
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
```ts
|
||||
@@ -188,7 +185,7 @@ curl --location --request GET 'http://localhost:8080/instance/connect/codechat'
|
||||
- [DockerHub Evolution API](https://hub.docker.com/repository/docker/davidsongomes/evolution-api)
|
||||
|
||||
After building the application, in the same directory as the files above, run the following command:
|
||||
```sh
|
||||
```sh
|
||||
docker-compose up
|
||||
```
|
||||
## Send Messages
|
||||
@@ -198,17 +195,17 @@ docker-compose up
|
||||
| Send Template | ❌ |
|
||||
| Send Media: audio - video - image - document - gif <br></br>base64: ```true``` | ✔ |
|
||||
| Send Media File | ❌ |
|
||||
| Send Media File | ❌ |
|
||||
| Send Audio type WhatsApp | ✔ |
|
||||
| Send Location | ✔ |
|
||||
| Send Link Preview | ✔ |
|
||||
| Send Contact | ✔ |
|
||||
| Send Reaction - emoji | ✔ |
|
||||
| Send Reaction - emoji | ✔ |
|
||||
| Send Poll Message | ✔ |
|
||||
| Send Buttons (Deprecated) | ❌ |
|
||||
| Send List (Deprecated) | ❌ |
|
||||
|
||||
## Postman collections
|
||||
- [Postman Json](./postman.json)
|
||||
|
||||
## Webhook Events
|
||||
|
||||
@@ -236,6 +233,29 @@ docker-compose up
|
||||
## Webhook Routes
|
||||
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.
|
||||
|
||||
| Name | Route |
|
||||
|------|-------|
|
||||
| APPLICATION_STARTUP | https://url_webhook/application-startup |
|
||||
| QRCODE_UPDATED | https://url_webhook/qrcode-updated |
|
||||
| CONNECTION_UPDATE | https://url_webhook/connection-update |
|
||||
| MESSAGES_SET | https://url_webhook/messages-set |
|
||||
| MESSAGES_UPSERT | https://url_webhook/messages-upsert |
|
||||
| MESSAGES_UPDATE | https://url_webhook/messages-update |
|
||||
| SEND_MESSAGE | https://url_webhook/send-message |
|
||||
| CONTACTS_SET | https://url_webhook/contacts-set |
|
||||
| CONTACTS_UPSERT | https://url_webhook/contacts-upsert |
|
||||
| CONTACTS_UPDATE | https://url_webhook/contacts-update |
|
||||
| PRESENCE_UPDATE | https://url_webhook/presence-update |
|
||||
| CHATS_SET | https://url_webhook/chats-set |
|
||||
| CHATS_UPDATE | https://url_webhook/chats-update |
|
||||
| CHATS_UPSERT | https://url_webhook/chats-upsert |
|
||||
| GROUPS_UPSERT | https://url_webhook/groups-upsert |
|
||||
| GROUPS_UPDATE | https://url_webhook/groups-update |
|
||||
| GROUP_PARTICIPANTS_UPDATE | https://url_webhook/groups-participants-update |
|
||||
| NEW_TOKEN | https://url_webhook/new-token |
|
||||
## Env File
|
||||
|
||||
See additional settings that can be applied through the **env** file by clicking **[here](./src/dev-env.yml)**.
|
||||
|
||||
> **⚠️Attention⚠️:** rename the **dev-env.yml** file to **env.yml**.
|
||||
|
||||
@@ -254,8 +274,6 @@ This code was produced based on the baileys library and it is still under develo
|
||||
#### PicPay
|
||||
|
||||
<div align="center">
|
||||
|
||||
<div align="center">
|
||||
<a href="https://app.picpay.com/user/davidsongomes1998" target="_blank" rel="noopener noreferrer">
|
||||
<img src="./public/images/picpay-image.png" style="width: 50% !important;">
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user