Houses configurations per agent for whatsapp api communications provided by WPPConnect API.
JIVAS action wrapper for WhatsApp API communications using the WPPConnect API with advanced mass messaging outbox. This action provides a wrapper for WhatsApp API communications using the WPPConnect API. As a core action, it simplifies and streamlines interactions with WhatsApp. The package is a singleton and requires the Jivas library version ^2.0.0.
jivas/wppconnect_action
WPPConnectAction
~2.0.0-aplha.40
~0.0.2
~2.8.5
Below is detailed guidance on how to configure and use the WPPConnect Action.
The WPPConnect Action provides an abstraction layer for interacting with WhatsApp via the WPPConnect API. It supports multiple configurations for various use cases, including:
The WPPConnect Action includes advanced mechanisms to optimize message delivery:
These features enhance reliability and minimize disruptions during high-volume messaging operations.
To use the WPPConnect Action, you need to set up the following configuration parameters. These specify connection and behavioral details.
Parameter | Type | Description | Default |
---|---|---|---|
api_url |
string | WPPConnect Server URL (e.g., "https://your-wppconnect-server.com" ) |
"" |
secret_key |
string | WPPConnect Server Secret Key for authentication. | "" |
token |
string | WPPConnect Server API Key for this session. | "" |
session |
string | WPPConnect Server Instance ID. | "" |
base_url |
string | JIVAS Base URL (your application's base URL). | "" |
webhook_url |
string | JIVAS webhook endpoint for receiving WPPConnect messages. | "" |
request_timeout |
float | Length of time (in seconds) this action waits for the API to complete a request. | 10.0 |
chunk_length |
int | Maximum length of message to send. Longer texts are split into subsequent messages. | 1024 |
use_pushname |
bool | Use the WhatsApp push name as the user name when set to True . |
True |
ignore_newsletters |
bool | Ignore newsletter messages when set to True . |
True |
ignore_forwards |
bool | Ignore forwarded messages when set to True . |
True |
outbox_base_rate_per_minute |
int | Base messages per minute (adapts dynamically). | 20 |
outbox_send_interval |
float | Current operational delay between batches. | 2.0 |
outbox_min_send_interval |
float | Absolute minimum delay (seconds). | 1.0 |
outbox_max_send_interval |
float | Maximum allowed delay (seconds). | 10.0 |
outbox_min_batch_size |
int | Maximum messages per batch. | 1 |
outbox_max_batch_size |
int | Minimum messages per batch.. | 10 |
webhook_url
must be a publicly accessible endpoint to enable event-driven communication from WPPConnect.outbox_base_rate_per_minute
to 20
for new numbers. This value should align with WhatsApp's acceptable rate-per-minute limits (default is 20
).outbox_max_batch_size
at or below 10
to comply with account limitations.chunk_length
if you have use cases that involve very long text messages.ignore_newsletters
and ignore_forwards
to filter out less relevant messages and avoid unnecessary processing.These guidelines help optimize performance and ensure compliance with WhatsApp's messaging policies.
Endpoint: /action/walker
Method: POST
{
"agent_id": "<AGENT_ID>",
"walker": "broadcast_message",
"module_root": "actions.jivas.wppconnect_action",
"args": {
"message": {
"message_type": "TEXT|MEDIA|MULTI",
...
},
"ignore_list": ["session_id_1", ...]
}
}
Endpoint: /action/walker
Method: POST
{
"agent_id": "<AGENT_ID>",
"walker": "send_messages",
"module_root": "actions.jivas.wppconnect_action",
"args": {
"messages": [
// Array of message objects
],
"callback_url": "https://your-callback.url"
}
}
{
"messages": [
{
"to": "session_id",
"message": {
"message_type": "TEXT",
"content": "Batch message"
}
}
],
"callback_url": "https://example.com/status"
}
Returns a job ID string for tracking.
Your callback will receive a JSON payload with the following structure automatically upon job completion:
{
"status": "success|partial|error",
"job_id": "<UUID>",
"processed_count": 10,
"failed_count": 2,
"pending_count": 0
}
{
"message": {
"message_type": "TEXT",
"content": "Hello World"
}
}
{
"message": {
"message_type": "MEDIA",
"mime": "image/jpeg",
"content": "Check this!",
"data": {
"url": "https://example.com/image.jpg",
"file_name": "image.jpg"
}
}
}
{
"message": {
"message_type": "MULTI",
"content": [
// Array of TEXT/MEDIA messages
]
}
}
wppconnect_action
project.git clone https://github.com/TrueSelph/wppconnect_action
git checkout -b new-feature-x
git commit -m 'Implemented new feature x.'
git push origin new-feature-x
This project is protected under the Apache License 2.0. See LICENSE for more information.
jvcli download action jivas/wppconnect_action
Last published
2 months ago
Version
0.0.10
Downloads
35
Author
jivasType
action
Visibility
Public
Tags