webex-meetings-api-samples
Overview
This project contains sample scripts demonstrating usage of the Webex Meetings API, using Python.
https://developer.cisco.com/webex-meetings/
The concepts and techniques shown can be extended to enable automated management of Webex Meetings features.
Also included is a Postman collection covering the requests used in the sample.
Samples built/tested using Visual Studio Code.
Available samples
-
sampleFlow.py
- demonstrates the following work flow:
- AuthenticateUser
- GetUser
- CreateMeeting
- LstsummaryMeeting
- GetMeeting
- DelMeeting
Can use webExId/password or webExId/accessToken for authorization
-
oauth2.py
- demonstrates a web application that can perform a Webex Meetings OAuth2 login (using Authlib), then performs a GetUser request. Can use either Webex Meetings OAuth or Webex Teams OAuth mechanisms.
-
Postman collection - Webex Meetings XML API.json
- import this Postman collection which contains select scripted API request samples
Webex environments
-
Full site - For full admin access and complete features, a production Webex instance is best. Some samples require site admin credentials
-
Trial site - The next best thing is to request a free Webex trial which should provide you admin access and lots of features to try
-
DevNet Webex Sandbox - For instant/free access, you can create an end-user account in the DevNet Webex Sandbox. Note, this instance is non-SSO/CI, and uses username/password authentication
Getting started
-
Install Python 3:
On Windows, choose the option to add to PATH environment variable
-
From a terminal, clone this repo and change into the directory:
git clone https://github.com/CiscoDevNet/webex-meetings-python-samples
cd webex-meetings-python-samples
-
(Optional but recommended) Create a Python virtual environment named venv
:
(you may need to use python3
on Linux/Mac):
python -m venv venv
source venv/bin/activate
-
Dependency Installation (you may need to use pip3
on Linux/Mac)
pip install -r requirements.txt
-
Open the project in Visual Studio Code:
-
In VS Code:
-
Rename .env.example
to .env
Edit .env
to specify your Webex credentials
-
Click on the Debug tab, then the Launch configurations drop-down in the upper left.
Select the sample you wish to run, e.g. 'Python: Launch sampleFlow.py`
-
See comments in the individual samples for additional sample-specific setup/launch details
-
Click the green Start Debugging button