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
-
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:
npm install
-
(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:
code .
-
In VS Code:
-
Rename the file
.env.sample
to.env
Edit the
.env
file:-
Paste in your Webex Teams Guest Issuer ID and shared secret
-
Be sure to save the file
Alternatively: use environment variables to specify
WEBEX_TEAMS_ISSUER_ID
andWEBEX_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
-