Skip to content

Commit

Permalink
Add: description of route for sending base64 images
Browse files Browse the repository at this point in the history
  • Loading branch information
nestorzamili committed Oct 13, 2024
1 parent 4591c8d commit ea302db
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# WhatsApp Bot

This is a WhatsApp bot built with Express.js that connects through the WhatsApp Web browser app and uses the [WhatsApp Web](https://wwebjs.dev/) client library for the WhatsApp Web API.
Expand All @@ -6,6 +7,7 @@ This is a WhatsApp bot built with Express.js that connects through the WhatsApp

- Send text messages to multiple individuals or groups simultaneously via API.
- Send file messages with or without captions to multiple individuals or groups simultaneously via API.
- *Send images as base64*
- Check WhatsApp Group IDs.
- Test response with `!ping`.
- Check logs with `!logs`.
Expand Down Expand Up @@ -67,6 +69,43 @@ echo "samunu_$(openssl rand -hex 32)"
| `attachment` | `file` | **Required**. *Example:*`D:/test.jpg` |
| `caption` | `string` | *Optional* |

#### Send Base64 Image

```bash
POST http://localhost:3000/send-base64-image
```

| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| `x-api-key` | `string` | **Required**. Your API key |
| `ids` | `string` | **Required**. *Single or Multiples ID, separate with comma without space. Example: [email protected],[email protected]*|
| `Content-Type` | `application/json` |
| `body` | `json` | `see example JSON body`

Example JSON body:
```
{
"caption": "caption",
"images": [
{
"mimetype": "image/jpeg",
"data": "base64encodedstring...",
"filename": "image1.jpg"
},
{
"mimetype": "image/png",
"data": "base64encodedstring...",
"filename": "image2.png"
}
]
}
```

## Note

Use the `app.js` file if you want to use localAuth, use the `remoteAuth.js` file if you want to use AWS S3 for auth. **Edit your `package.json` file**


## Doc

See more details here
Expand Down

0 comments on commit ea302db

Please sign in to comment.