WhatsApp Business API Client
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wabclient-2.3.3.tar.gz
.
File metadata
- Download URL: wabclient-2.3.3.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c05d9b65de193e29cfed1c0fca610d8bd66152444ff3be5165cdc2c4c65c927 |
|
MD5 | 6a2e7889ebb65e7ef037eb0e9162f5d9 |
|
BLAKE2b-256 | e579d8bccfe3b67f9a0e7b962e78b6244a2f73151facf65a24c804768cc26b88 |
File details
Details for the file wabclient-2.3.3-py3-none-any.whl
.
File metadata
- Download URL: wabclient-2.3.3-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b42844cec4c201890e056da3b4195592e68e609ccb1c74e3f4567c8de4bd9cb4 |
|
MD5 | 61c3fe5e8442c946b3e29c069af432b3 |
|
BLAKE2b-256 | 040e9ab7ee600add1ffa183e0048e9211c4e140b9e2a51d40f4a216aa24e7149 |