Business Communications is an API for creating, managing, and launching agents for Google's Verified SMS and Business Messages platforms.
The documentation for the Business Commmunications API can be found here.
Python 3.5, 3.6 and 3.7, and 3.8 are fully supported and tested.
- Register with Business Messages.
- Once registered, follow the instructions to enable the APIs for your project.
Install this library in a virtualenv using pip. virtualenv is a tool to create isolated Python environments. The basic problem it addresses is one of dependencies and versions, and indirectly permissions.
With virtualenv, it's possible to install this library without needing system install permissions, and without clashing with the installed system dependencies.
pip install virtualenv
python -m venv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install
pip install virtualenv
python -m venv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install
from oauth2client.service_account import ServiceAccountCredentials
from businesscommunications.businesscommunications_v1_client import BusinesscommunicationsV1
from businesscommunications.businesscommunications_v1_messages import (
Brand)
SCOPES = ['https://www.googleapis.com/auth/businesscommunications']
# Initialize the API authentication credentials
credentials = ServiceAccountCredentials.from_json_keyfile_name(
'your-service-account-key-file-location', scopes=SCOPES)
# Create the client
client = BusinesscommunicationsV1(credentials=credentials)
# Create the service for brands
brands_service = BusinesscommunicationsV1.BrandsService(client)
# Create a new brand with the name "Test Brand"
brand = brands_service.Create(Brand(displayName='Test Brand'))
# Print created brand object
print(brand)
See code examples to see example
usage for most API features. The samples' README.md
has instructions for running the samples.
Sample | Source Code |
---|---|
Brand CRUD Operations | source code |
Agent CRUD Operations | source code |
Location CRUD Operations | source code |
Contributions welcome! See the Contributing Guide.
Apache Version 2.0
See LICENSE