Python client SDK for Sendbee Public API
Project description
_______ _______ __ _ ______ ______ _______ _______ _______ _____ _____
|______ |______ | \ | | \ |_____] |______ |______ |_____| |_____] |
______| |______ | \_| |_____/ |_____] |______ |______ | | | __|__
.' '. __
. . . (__\_
. . . -{{_(|8)
' . . ' ' . . ' (__/
Sendbee Python API Client
Installation
> pip install sendbee_api
# not on pypi right now, but will be
Usage
Initialization
from sendbee_api import SendbeeApi
api = SendbeeApi(
'__your_api_key_here__', '__your_secret_key_here__',
'__business_id_here__'
)
Fetch contacts
contacts = api.contacts([tags=['...', ...]], [search_query='...'])
for contact in contacts:
contact.id
contact.name
contact.phone
contact.email
contact.created_at
contact.tags
Subscribe contact
contact = api.subscribe_contact(phone='+...', [tags=['...', ...]])
contact.id
contact.name
contact.phone
contact.email
contact.created_at
contact.tags
Fetch tags
tags = api.tags([name='...'])
for tag in tags:
tag.id
tag.name
Create tag
tag = api.create_tag(name='...')
tag.id
tag.name
Update tag
tag = api.update_tag(id='...', name='...')
tag.id
tag.name
Delete tag
tag = api.delete_tag(id='...')
Fetch message templates
templates = api.message_templates([search_query='...'])
for template in templates:
template.id
template.text
template.tags
template.keyword
template.language
template.approved
Send template message
response = api.send_template_message(
phone='+...', template_keyword='...', language='...', tags=['...', ...]
)
response.conversation_id
# save this id, and when you get sent message status requests on
# your webhook, you'll get this same id to identify the conversation
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
sendbee_api-0.1.0.dev0.tar.gz
(11.1 kB
view hashes)
Built Distribution
Close
Hashes for sendbee_api-0.1.0.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8756cc61630bb2859c6f262d8ec38dd4568deb92abef6681086302e6b57ee0c |
|
MD5 | c9b4c53327a566573ce5997c17ecbb54 |
|
BLAKE2b-256 | b17d767f89b6d54edd0636cd41e042359b97affb0d301dde31676cc105076e93 |