Skip to content

hartemyaakoub/liqaa-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

LIQAA Python SDK

Server-side Python client for the LIQAA Public API.

pypi version python license docs

Website · Docs · JS SDK


Install

pip install liqaa

Pure-Python, zero dependencies (uses stdlib urllib + hmac). Python 3.9+.

Quick start

Exchange identity → JWT

from liqaa import LiqaaClient

client = LiqaaClient(public_key=os.environ["LIQAA_PK"], secret_key=os.environ["LIQAA_SK"])

token = client.exchange_sdk_token(email="visitor@example.com", name="Anonymous Visitor")
print(token["sdk_token"]) # → tkc_eyJhbGciOi…

Create a persistent room

conv = client.create_conversation(
 caller_email="agent@yoursite.com",
 callee_email="customer@example.com",
 external_conversation_id="ticket-42",
)
print(conv["join_url"]) # → https://liqaa.io/meeting/room-abc123

Verify a webhook

from liqaa import WebhookVerifier
from flask import Flask, request, abort

verifier = WebhookVerifier(os.environ["LIQAA_WEBHOOK_SECRET"])
app = Flask(__name__)

@app.post("/webhooks/liqaa")
def handle():
 sig = request.headers.get("X-LIQAA-Signature", "")
 if not verifier.verify(request.get_data(), sig):
 abort(401)
 event = request.get_json()
# event["event"] == "call.started" / "call.ended" / etc.
 return "", 204

Async support

from liqaa.aio import AsyncLiqaaClient

async def main():
 client = AsyncLiqaaClient(public_key=..., secret_key=...)
 conv = await client.create_conversation(caller_email="a@b.com", callee_email="c@d.com")

Frameworks

License

MIT © TKAWEN — LIQAA Cloud.

About

Server-side Python SDK for LIQAA — drop-in video calls and messaging.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages