Python SDK

pip install glytos

Setup

import os
from glytos import Glytos

glytos = Glytos(api_key=os.environ["GLYTOS_API_KEY"])

Resources

glytos.workflows.list()
glytos.workflows.retrieve(workflow_uuid)
glytos.workflows.create(name="Receptionist", mode="prompt")

glytos.calls.create(transport="phone", workflow_uuid=workflow_uuid, to_number="+1...")
glytos.calls.list()

glytos.sessions.retrieve(workflow_uuid, session_uuid)

Anything not wrapped

glytos.request("GET", "/providers")

Verifying webhooks

from glytos import verify_webhook

# `raw_body` must be the untouched request body - parsing and re-serialising it
# changes the bytes and the signature will not match.
ok = verify_webhook(raw_body, request.headers["X-Glytos-Signature"], secret)

See Webhooks.

Python SDK · Glytos Docs