{"id":21319475,"url":"https://github.com/zoom/videosdk-auth-endpoint-sample","last_synced_at":"2025-07-12T04:31:54.694Z","repository":{"id":85790816,"uuid":"376134321","full_name":"zoom/videosdk-auth-endpoint-sample","owner":"zoom","description":"Generate a Video SDK JWT to join Zoom Video SDK sessions with the Video SDK.","archived":false,"fork":false,"pushed_at":"2024-08-26T11:29:17.000Z","size":33,"stargazers_count":13,"open_issues_count":1,"forks_count":20,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-26T13:51:47.473Z","etag":null,"topics":["sample-app"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zoom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-11T20:20:48.000Z","updated_at":"2024-08-26T11:29:22.000Z","dependencies_parsed_at":"2024-02-27T02:45:04.404Z","dependency_job_id":"64fae7c8-5061-47c4-bab5-ecee5d2fd6a6","html_url":"https://github.com/zoom/videosdk-auth-endpoint-sample","commit_stats":null,"previous_names":["zoom/videosdk-auth-endpoint-sample"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoom%2Fvideosdk-auth-endpoint-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoom%2Fvideosdk-auth-endpoint-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoom%2Fvideosdk-auth-endpoint-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoom%2Fvideosdk-auth-endpoint-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoom","download_url":"https://codeload.github.com/zoom/videosdk-auth-endpoint-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225795416,"owners_count":17525316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sample-app"],"created_at":"2024-11-21T19:42:06.797Z","updated_at":"2025-07-12T04:31:54.681Z","avatar_url":"https://github.com/zoom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zoom Video SDK Auth Endpoint sample\n\nUse of this sample app is subject to our [Terms of Use](https://explore.zoom.us/en/video-sdk-terms/).\n\nThis is a Node.js / Express server that generates a [Video SDK JWT](https://developers.zoom.us/docs/video-sdk/auth/#generate-a-video-sdk-jwt) via an HTTP request for authorized use of the [Zoom Video SDK](https://developers.zoom.us/docs/video-sdk/).\n\nIf you would like to skip these steps and just deploy the finished code to a managed service, click the Deploy to Railway/Render/Heroku button. (You will still need to configure a few simple things, so skip to [Deployment](#deployment).)\n\n| Railway | Render | Heroku |\n|:-:|:-:|:-:|\n| [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/dO2hTU?referralCode=HTPdHX) | [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/zoom/videosdk-auth-endpoint-sample) | [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/zoom/videosdk-auth-endpoint-sample) | \n\n\u003e Note: Both Railway and Render have free tiers, but Heroku requires a credit card to deploy.\n\n## Installation\n\nIn terminal, run the following command to clone the repository:\n\n`$ git clone https://github.com/zoom/videosdk-auth-endpoint-sample.git`\n\n## Setup\n\n1. In terminal, `cd` into the cloned repository:\n\n   `$ cd videosdk-auth-endpoint-sample`\n\n2. Then install the dependencies:\n\n   `$ npm install`\n\n3. Rename `.env.example` to `.env`, edit the file contents to include your [Zoom Video SDK key and secret](https://developers.zoom.us/docs/video-sdk/get-credentials/), save the file contents, and close the file:\n\n4. Start the server:\n\n   `$ npm run start`\n\n## Usage\n\nMake a POST request to `http://localhost:4000` (or your deployed url) with the following request body:\n\n| Property                 | Type     | Required? | Validation Rule(s)                                                                                           |\n| ------------------------ | -------- | --------- | ------------------------------------------------------------------------------------------------------------ |\n| `sessionName`            | `string` | **Yes**   | - Required \u003cbr\u003e - Value length be fewer than 200 characters                                                  |\n| `role`                   | `number` | **Yes**   | - Required \u003cbr\u003e - Must equal `0` or `1`                                                                      |\n| `expirationSeconds`      | `number` | No        | - Must be between `1800` (30 minutes) and `172800` (48 hours) seconds                                        |\n| `userIdentity`           | `string` | No        | - Must be fewer than 35 characters                                                                           |\n| `sessionKey`             | `string` | No        | - Must be fewer than 36 characters                                                                           |\n| `geoRegions`             | `string` | No        | - Must be a comma-separated string with valid Zoom geo regions                                               |\n| `cloudRecordingOption`   | `number` | No        | - Must equal `0` or `1`                                                                                      |\n| `cloudRecordingElection` | `number` | No        | - Must equal `0` or `1`                                                                                      |\n| `telemetryTrackingId`    | `string` | No        | N/A                                                                                                          |\n| `videoWebRtcMode`        | `number` | No        | - Must equal `0` or `1`                                                                                      |\n| `audioWebRtcMode`        | `number` | No        | - Must equal `0` or `1` \u003cbr\u003e - [Replaces `audioCompatibleMode`](#audio-compatible-mode-vs-audio-webrtc-mode) |\n\n### Audio Compatible Mode vs Audio WebRTC Mode\n\n`audioWebRtcMode` replaces `audioCompatibleMode`, which is now deprecated. Update your code to use `audioWebRtcMode` going forward.\n\n### Example Request\n\nPOST `http://localhost:4000`\n\nRequest Body:\n\n```json\n{\n  \"sessionName\": \"Cool Cars\",\n  \"role\": 1,\n  \"sessionKey\": \"session123\",\n  \"userIdentity\": \"user123\"\n}\n```\n\nIf successful, the response body will be a JSON representation of your signature:\n\n```json\n{\n  \"signature\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBfa2V5IjoiVklERU9fU0RLX0tFWSIsImlhdCI6MTY0NjI0ODc5NiwiZXhwIjoxNjQ2MjU1OTk2LCJ0cGMiOiJDb29sIENhcnMiLCJ1c2VyX2lkZW50aXR5IjoidXNlcjEyMyIsInNlc3Npb25fa2V5Ijoic2Vzc2lvbjEyMyIsInJvbGVfdHlwZSI6MH0.Y6C65mZUxTZFeGiOI6oW5q2UkIXe3nLTK0MVNkfiJ9c\"\n}\n```\n\nIn the [Video SDK](https://developers.zoom.us/docs/video-sdk/auth/#start-and-join-sessions-with-the-video-sdk-jwt), pass in the `signature` to the `join()` function:\n\n```js\n// Make http request to your auth endpoint to get the Video SDK JWT\n\n// Video SDK - web - example:\n\nclient.join(\n   signature: signature,\n   topic: sessionName,\n   userName: userName,\n   password: sessionPasscode\n)\n```\n\n## Deployment\n\n### Deploy to a Managed Service\n\n1. After clicking the \"Deploy to \u003cProvider\\\u003e\" button, enter a name for your app (or leave it blank to have a name generated for you), and insert your [Zoom Video SDK credentials](https://developers.zoom.us/docs/video-sdk/get-credentials/):\n\n   - `ZOOM_VIDEO_SDK_KEY` (Your Zoom Video SDK Key, found on your Zoom Video SDK App's Credentials page)\n   - `ZOOM_VIDEO_SDK_SECRET` (Your Zoom Video SDK Secret, found on your Zoom Video SDK App's Credentials page)\n\n1. Then click \"Deploy App\".\n\n1. Use your URL as your Video SDK Auth Endpoint.\n\n   Example: `https://abc123.provider.com/`\n\n```bash\n$ curl \u003cYOU_URL\u003e -X POST -d '{  \"sessionName\": \"Cool Cars\",  \"role\": \"1\",  \"sessionKey\": \"session123\",  \"userIdentity\": \"user123\"}' -H \"Content-Type: application/json\"\n```\n\n### Deploy with Docker\n\nIf you prefer to run the application in a Docker container, follow the steps below.\n1. Build the Docker Image: In your terminal, run the following command to build the Docker image:\n\n```\n   docker build -t zoom-videosdk-auth .\n```\n\n2. Run the Docker Container: Once the image is built, you can run the container while passing in the required environment variables for the Zoom Video SDK credentials:\n\n```bash\n$ docker run -d -p 4000:4000 \\\n   -e ZOOM_VIDEO_SDK_KEY=your_zoom_videosdk_key \\\n   -e ZOOM_VIDEO_SDK_SECRET=your_zoom_videosdk_secret \\\n   --name zoom-videosdk-auth zoom-videosdk-auth\n```\n\n\u003e This will start the app on port 4000.\n\n3. Make Requests to the Endpoint: Once the container is running, you can make a POST request to `\u003cYOU_URL\u003e` with the required parameters:\n\n#### Example Request:\n\n```bash\n$ curl \u003cYOU_URL\u003e -X POST -d '{  \"sessionName\": \"Cool Cars\",  \"role\": \"1\",  \"sessionKey\": \"session123\",  \"userIdentity\": \"user123\"}' -H \"Content-Type: application/json\"\n```\nStopping the Docker Container: To stop the Docker container, run:\n\n```bash\n$ docker stop zoom-videosdk-auth\n```\nRemoving the Docker Container: To remove the container:\n\n```bash\n$ docker rm zoom-videosdk-auth\n```\n\nNow you can generate your Video SDK JWT.\n\n\u003c!-- ### Heroku (CLI)\n\n1. If you cloned this repository, you may use the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) to deploy your server. Remember to [set your config vars (envoirnment variables)](https://devcenter.heroku.com/articles/config-vars).\n\n1. Use your Heroku URL as your Video SDK Auth Endpoint.\n\n   Example: `https://abc123.herokuapp.com/` --\u003e\n   \n### Other Server Hosting\n\n1. For Other Server Hosting information, see [this tutorial](https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/deployment#choosing_a_hosting_provider).\n\n1. Use your deployed URL as your Video SDK Auth Endpoint.\n\n   Example: `https://abc123.compute-1.amazonaws.com/`\n\nNow you can [generate your Video SDK JWT](#usage).\n\n## Need help?\n\nIf you're looking for help, try [Developer Support](https://devsupport.zoom.us)   or our [Developer Forum](https://devforum.zoom.us). Priority support is also available with [Premier Developer Support](https://explore.zoom.us/docs/en-us/developer-support-plans.html) plans.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoom%2Fvideosdk-auth-endpoint-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoom%2Fvideosdk-auth-endpoint-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoom%2Fvideosdk-auth-endpoint-sample/lists"}