Skip to content

Python and JavaScript sample code showing how to build and authenticate JSON Web Tokens for Cisco Webex Teams

License

Notifications You must be signed in to change notification settings

CiscoDevNet/webex-teams-jwt-samples

Repository files navigation

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

About

Python and JavaScript sample code showing how to build and authenticate JSON Web Tokens for Cisco Webex Teams

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages