Skip to main content

Helper to handle with facebook's waba

Project description

Facebook Whatsapp Business Account Manager

Handle some facebook whatsapp business account manager functionalities.

FYI: waba stands for WhatsApp Business Account

Usage

Constructor

from fb_waba_manager import FbWabaManager

access_token = 'my_access_token'
business_id = 'my_business_id'

fwm = FbWabaManager(access_token, business_id)

Methods

The following methods are provided:

Ps.: All methods are generators.

list_business_wabas

Retrieve a list of all waba objects of your business

for w in fwm.list_business_wabas():
  print(w)

# Example of a waba object:
# {
#   'id': '21312312321',
#   'name': 'Some name',
#   'currency': 'USD',
#   'timezone_id': '25',
#   'business_type': 'ent',
#   'message_template_namespace': 'gafsdf_2132_213_asd'
# }

list_waba_phone_numbers

Retrieve a list of all phone number objects of your waba

Parameters Type
waba_id str
waba_id = '1231434'

for pn in fwm.list_waba_phone_numbers(waba_id):
  print(pn)

# Example of a phone number object:
# {
#   'verified_name': 'My number name',
#   'display_phone_number': '+55 73 1234-5678',
#   'quality_rating': 'GREEN',
#   'thread_limit_per_day': 1000,
#   'id': '132354254546'
# }

list_business_phone_numbers

Retrieve a list of all phone number objects of all wabas of your business

Parameters Type
wabas list (optional)
for pn in fwm.list_business_phone_numbers():
  print(pn)

# You can pass a list of wabas
# the objects must have at least the id key

my_wabas = [
  {
    'id': '12342443'
  },
  {
    'id': '56355465'
  }
]

for pn in fwm.list_business_phone_numbers(my_wabas):
  print(pn)

Reference

The waba, business, phone number definition and properties can be found at Facebook's oficial documentation

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

fb_waba_manager-0.0.4.tar.gz (7.1 kB view details)

Uploaded Source

File details

Details for the file fb_waba_manager-0.0.4.tar.gz.

File metadata

  • Download URL: fb_waba_manager-0.0.4.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.8.0

File hashes

Hashes for fb_waba_manager-0.0.4.tar.gz
Algorithm Hash digest
SHA256 45673f3f8256d108aa50dea2d95e41bbeb1529d5cd9d0814e371093862de8c0c
MD5 d3880457d4710772571f0c48966c2d2b
BLAKE2b-256 12e6a8d7565f426ae5aefd4fc28dcc71787e7884563a297b28ce876d1d5b7be5

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