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:
All methods accept the notify_request parameter, if the given value is True
the method will always return the requested data and a bool indicating if a new request was made to the GraphAPI.
Ps.: All methods are generators.
list_business_wabas
Retrieve a list of all waba objects of your business
| Parameters | Type |
|---|---|
| notify_requests | bool (optional) |
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 |
| notify_requests | bool (optional) |
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) |
| notify_requests | bool (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)
list_message_templates
Retrieve a list of all message templates objects of your waba
| Parameters | Type |
|---|---|
| waba_id | str |
| notify_requests | bool (optional) |
waba_id = '1231434'
for mt in fwm.list_message_templates(waba_id):
print(mt)
# Example of a phone number object:
# {
# "name": "my_message_template_name",
# "components": [
# {
# "type": "BODY",
# "text": "Obrigado pelo contato, at\u00e9 a pr\u00f3xima.\\n\\n:)"
# }
# ],
# "language": "pt_BR",
# "status": "APPROVED",
# "category": "ACCOUNT_UPDATE",
# "id": "16453353"
# }
Reference
The waba, business, phone number and message template definition or properties can be found at Facebook's oficial documentation
Metadata
Release files for fb-waba-manager 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fb_waba_manager-0.0.6.tar.gz | 8.0 kB | Without provenance | Details for fb_waba_manager-0.0.6.tar.gz |
Release files / fb_waba_manager-0.0.6.tar.gz
| Download URL | fb_waba_manager-0.0.6.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
522635bf51e5b0c6990849024f3c375f4d1f688c654108ffbbeb496c6767367e
|
|
BLAKE2b-256 checksum How to use checksums |
2e8d70425f8d75d8e8e099d7d0fc06df5963f8555b401a13d8421ed2463b0468
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for fb-waba-manager 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.