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.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: wabclient-2.3.0.tar.gz
  • Upload date:
  • Size: 15.8 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.0.tar.gz
Algorithm Hash digest
SHA256 2ee097b6d826812d47f93fa1c3ee0bc1c2a03c330461c85905999da69ffeb321
MD5 753744a9ca680bf272d5da9e24e13057
BLAKE2b-256 1c013a81a9d78f329d58adc93560ed3bae1bdb54cb4a57c1c03acc00a84fe856

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wabclient-2.3.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f689f1c6f4344c1987b9a5a635dfbdacaf37ad2e3d8fed058c79753c864b28f4
MD5 af9c562dd9021adffab9ea2f0a5e1651
BLAKE2b-256 ae23b2da06a6087aa0735f60cd9dea8175cf0fa100c0d1ca4493332f1e3551e0

See more details on using hashes here.

Supported by

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