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:

    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:

    1. 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 and WEBEX_TEAMS_ISSUER_SECRET

    2. 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

published

View code on GitHub

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.