This script generates a Webex Meetings Recording Report (CSV) detailing currently stored recordings in one or more Webex Sites over a configurable time period. The report includes information about recordings such as:
Note: The default report considers recordings in the last 30 days (configurable to a value >= 0)
OAuth Integrations are how you request permission to invoke the Webex REST API on behalf of another Webex Teams user. To do this in a secure way, the API supports the OAuth2 standard which allows third-party integrations to get a temporary access token for authenticating API calls instead of asking users for their password.
Note: It's important to use a Full Admin Account
as the underlying account for the integration. Several API calls within the script are 'admin-only' and only allow listing site-wide recordings for admins.
To register an integration with Webex Teams:
developer.webex.com
My Webex Apps
Create a New App
Create an Integration
to start the wizardhttp://0.0.0.0:5500/callback
(this must be exact)meeting:admin_recordings_read
meeting:admin_preferences_read
To read more about Webex Integrations & Authorization and to find information about the different scopes, you can find information here
git clone [repository name]
. To find the repository name, click the green Code
button above the repository files. Then, the dropdown menu will show the https domain name. Click the copy button to the right of the domain name to get the value to replace [repository name] placeholder..env_sample
file to .env
. Rename config_sample.py
to config.py
(in src
directory).Webex Client Key
and Client Secret
to .env
from the prerequisites section.WEBEX_CLIENT_ID="" WEBEX_CLIENT_SECRET=""
config.py
, an optional Site URL
list can be provided to only generate a report for those sites. A custom Time Period
(days) can be specified as well (the default is 30 days - value must be >= 0)# A list of webex sites to get recordings from (a user must have admin access to all sites) SITE_LIST = ["site1", "site2"] # Time period (days) to retrieve recordings for (must be greater than 0!) TIME_PERIOD = 30
pip3 install -r requirements.txt
To generate a report, there are 2 important scripts: app.py
and report.py
.
app.py
: This web app script is required to generate the Webex OAuth Tokens, and must be run first. Run the script with:$ python3 app.py
Once the script is running, navigate to http://0.0.0.0:5500
(the same one configured in the Webex Integration). This will prompt a Webex Login page.
Sign in with the Full Admin Account
. The account provided here grants the access permissions of the account to the token (in addition to the scopes defined in the integration).
You may be prompted to grant access to the integration. Once successful, a landing page with a 'Success' message is displayed:
An 'Access Token' and a 'Refresh Token' will be written to tokens.json
. The 'Access Token' and 'Refresh Token' are valid for 14 and 90 days respectively. If the access token expires, it will automatically be refreshed if the refresh token is valid (and the refresh token's life is reset back to 90 days).
This process must only be completed once if the report.py
script is run within 90 days of generating the tokens. Otherwise, if both tokens are expired, the process must be repeated.
report.py
: This script is the main report script. It relies on the tokens generated from app.py
. Run the script with:$ python3 report.py
The script will generate the CSV report in the reports
directory with a timestamped name like: recording_report_[datetime].csv
. Console output and an example report are shown below:
Provided under Cisco Sample Code License, for details see LICENSE
Our code of conduct is available here
See our contributing guidelines here
Please note: This script is meant for demo purposes only. All tools/ scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use.
You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community