The Cisco Webex Teams API service has a neat SDK for calling methods from your personal account. One of these methods is to fetch your personal status (eg. active, DoNotDisturb, presenting, OnCall). This post will look at the API and pass the 'status' to any service (eg. MQTT subscriber/publisher).
Write 2 files called status.py and config.py:
For status.py :
Write 3 functions (including main) and then 'dunder' main to run main function:
For config.py:
Specify your Webex API token (create Webex Teams account, go to developer.cisco.com for toke). Update IP address and port of MQTT:
Optional: change the time.sleep(5) to any number in seconds between API request.
Top comments (0)