Skip to content

isabella232/bm-snippets-python

 
 

Repository files navigation

Business Messages: Python snippets

These code snippets demonstrate how to perform operations with the Business Messages API using Python.

This project contains multiple examples. Each file contains a single operation with the Business Messages API.

To run the Python scripts you need to be signed up with Business Messages.

Documentation

The documentation for the Business Messages API can be found here.

Prerequisite

You must have the following software installed on your machine:

Before you begin

  1. Register with Business Messages.
  2. Once registered, follow the instructions to enable the APIs for your project.

Installation

Mac/Linux

python -m venv source /bin/activate /bin/pip install -r requirements.txt

Windows

python -m venv \Scripts\activate \Scripts\pip.exe install -r requirements.txt

Supported Python Versions

Python 3.5, 3.6 and 3.7, and 3.8 are fully supported and tested.

How to run the Python scripts?

  1. Locate the file with the code snippet you want to execute.
  2. Replace all the values of the variables on top of the file that are set to EDIT_HERE.
  3. Make sure the path to your service account key is correct. The scripts use the path ./service_account_key.json.
  4. On your terminal, run python file-name-to-be-executed.py

Learn more

To learn more about setting up Business Messages and supporting chat from Search and Maps, see the documentation.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%