This work is extracted from Praekelt PBC’s work on MomConnect and WhatsApp. See the blog post for more details.
This does not work with a normal WhatsApp account, only the WhatsApp Business API.
Also has some support for creating message templates and sending message templates in bulk.
$ pip install wabclient[cli]
$ wabclient create --help
$ wabclient create \
--number <your number without leading + like `27123456789`> \
--token <your auth token> \
--name <template name> \
--template <template>
$ wabclient send --help
$ wabclient send \
--csv-file wa_ids.csv \
--token your-auth-token \
--namespace the-namespace \
--name the-element-name \
--rate-limit 60\60 \
--param "the first HSM template default param" \
--param "the second HSM template default param"
The CSV file should list the WA ids, one per line. WA ids are generally in the E.164 format without a leading plus. If you’re getting errors adding the –debug flag will print the JSON error response from the API to stderr.
For WA ids that were sent to successfully will be print in green to stdout, WA ids that are invalid will print to stderr in red.
Release files for wabclient 2.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wabclient-2.3.3.tar.gz | 15.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wabclient-2.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.9 kB
Release files / wabclient-2.3.3.tar.gz
| Download URL | wabclient-2.3.3.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c05d9b65de193e29cfed1c0fca610d8bd66152444ff3be5165cdc2c4c65c927
|
|
BLAKE2b-256 checksum How to use checksums |
e579d8bccfe3b67f9a0e7b962e78b6244a2f73151facf65a24c804768cc26b88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / wabclient-2.3.3-py3-none-any.whl
| Download URL | wabclient-2.3.3-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b42844cec4c201890e056da3b4195592e68e609ccb1c74e3f4567c8de4bd9cb4
|
|
BLAKE2b-256 checksum How to use checksums |
040e9ab7ee600add1ffa183e0048e9211c4e140b9e2a51d40f4a216aa24e7149
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|