webex-teams-jwt-samples
Overview
Python and JavaScript sample project for Visual Studio Code showing how to build and authenticate JSON Web Tokens for Cisco Webex Teams.
Includes 'native' and popular-library examples (PyJWT / jsonwebtoken)
See background information on the Webex Teams Guest Issuer feature
Getting started
-
Clone this repo, and navigate into the directory:
git clone https://github.com/CiscoDevNet/webex-teams-jwt-samples.git
cd webex-teams-jwt-samples
-
Install Node.JS dependencies:
-
(Optional) create and activate a Python3 virtual environment:
python3 -m venv venv
source env/bin/activate
-
Install Python3 dependencies:
pip install -r requirements.txt
-
Launch Visual Studio Code:
-
In VS Code:
-
Rename the file .env.sample
to .env
Edit the .env
file:
Alternatively: use environment variables to specify WEBEX_TEAMS_ISSUER_ID
and WEBEX_TEAMS_ISSUER_SECRET
-
Open the sample .js
or .py
file you wish to run.
From the Run panel on the left, select either Launch Node.js sample or Launch Python sample as appropriate, then either press F5 or click the green 'Run' button