Skip to content

Instantly share code, notes, and snippets.

@sboily
Last active April 24, 2020 14:59
Show Gist options
  • Save sboily/3f769682146f9c41ae2550579c30ac42 to your computer and use it in GitHub Desktop.
Save sboily/3f769682146f9c41ae2550579c30ac42 to your computer and use it in GitHub Desktop.
list presences in chatd
apt install wazo-chatd-client-python3
------------------------
#!/usr/bin/python3
from wazo_auth_client import Client as Auth
from wazo_chatd_client import Client as Chatd
import pprint
username = ""
password = ""
host = "localhost"
def get_token():
auth = Auth(host, username=username, password=password, verify_certificate=False)
token_data = auth.token.new('wazo_user', expiration=3600)
return token_data['token']
token = get_token()
c = Chatd(host, token=token, verify_certificate=False)
presences = c.user_presences.list()
pprint.pprint(presences)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment