Skip to main content

WhatsApp Business API Client

Project description

https://circleci.com/gh/praekeltfoundation/python-whatsapp-business-client/tree/develop.svg?style=svg

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wabclient-2.3.1.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

wabclient-2.3.1-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file wabclient-2.3.1.tar.gz.

File metadata

  • Download URL: wabclient-2.3.1.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

Hashes for wabclient-2.3.1.tar.gz
Algorithm Hash digest
SHA256 b2c862baf29470cef45a34fbaaa88c655b51057a106ff7744c84651969241aae
MD5 3b1ac0c3a9e6389130fa66ef26374e2d
BLAKE2b-256 6aa76b9050155ca40dc2b73792c0564af38f89d8ffd5230a95e313fba38332b9

See more details on using hashes here.

File details

Details for the file wabclient-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: wabclient-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 17.8 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

Hashes for wabclient-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 470a28c85c92cb836450ee3cbe15821d918728e029cf527acea0f492e3006925
MD5 ed8d54336046a542d65f30ecac09c28a
BLAKE2b-256 5c5129c801f2acaacff32f604743287d10286c27c0c18407c8f12f56d82ebb7e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page