-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: description of route for sending base64 images
- Loading branch information
1 parent
4591c8d
commit ea302db
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
@@ -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`. | ||
|
@@ -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 | ||
|