How to create a Windows Zoom Client App

In this document, I'll show you how to create an app token for your Zoom client app using JWT.IO website. In order to prevent the mistakes, a C# module that can generate JSON Web Token (JWT) for your Zoom Client App's App Token by giving SDK key and SDK secret are also included. How to validate the generated JWT token? You can directly paste the token to JWT.IO debug website. Check detail in the following.
Concept
Zoom Client SDK requires an App Token for authenticating to use the SDK. If you want to write the Zoom Client App, at first, you should generate the App Token. With the App token, the App gets access to the Zoom Client SDK.
Zoom chooses JSON Web Token (JWT) standard to represent the App token. Ok, let's create the JSON Web Token for your app token.
In this document, I'll show how to create a JSON Web Token by giving the SDK key and the SDK secret from JWT.IO website. If you follow the procedure of the Zoom official document, you'll found it's easy to make mistakes that cause your application hangs or always get authorized failure because of the wrong JSON Web Token format.
Thanks, Mr. k.krylov[6], a C# module can automatically generate JSON Web Token for your Zoom Client App's App Token by giving SDK key and SDK secret. Using the module, you'll always easily and make no mistakes to generate the JSON Web Token for your application. I modify the code to fill the format of the ZOOM Client SDK authentication. NOTE: never hardcode your SDK Key or Secret in your application or anywhere that is publicly accessible.
Github: Source
Table of Content
1. The SDK key and the SDK Secret 2
2.1. Generate JWT token (using JWT.IO) 3
2.2. Generate JWT token (in C#) 5
3. Create the Windows Zoom Client App 8
1. The SDK key and the SDK Secret
Based on the Client SDK, a Zoom client app authenticates with Zoom through a pair of credentials, SDK key, and the SDK secret that were signed and communicate using JSON Web Tokens.
In order to use Zoom Client SDK, you need the SDK key and the SDK secret to generate a JSON web token for authenticating with Zoom. Here, I'll show you how to get these credentials.
Step 1: Sign-in to the Zoom App Market
Step 2: Choose SDK
(Edit)
2. Generate JSON Web Token
The JSON Web Token (JWT) is used for authenticating to access the Zoom Client SDK. We can use JWT.IO to generate the token by hand. Here is a comprehensive tutorial [3].
If you want to avoid mistakes from generating JWT token by yourself. You can use Microsoft.IdentityModel.Tokens package to auto-generate JWT token for you. In order to make sure the token is correct, you can paste the token and the secret to the JWT.IO debugger to see the decoded metadata.
2.1. Generate JWT token (using JWT.IO)
Step 1: The JWT.Io site
Step 2: Fill the form
Header
Payload
For generating epoch time, using Tool: Generate Epoch time, Here, appKey use the SDK key that is generated from https://marketplace.zoom.us/.
Based on the document, the parameters are listed as follows.
appKey: the SDK Key found in the App Dashboard.
iat: the timestamp of the token in seconds identifying when the JWT is issued.
exp: when the JWT itself expires in epoch format. Must be at least 30 minutes (1800 seconds) greater than the token’s iat field. Max value of iat value + 48 hours (172,800 seconds).
tokenExp: when the SDK authentication session expires in epoch format. Must be at least 30 minutes (1800 seconds) greater than the token’s iat field.
Verify Signature
Fill the 'Your_SDK_SECRET' from https://marketplace.zoom.us/.
Example
(Edit)
2.2. Generate JWT token (in C#)
You can use the following c# code to generate the JWT token. Mr. k.krylov[6] provided a valuable example to do the job. I modify the code for creating the Zoom Client JWT token.
2.2.1. Code
File: class1.cs
2.2.2. Usage
2.2.3. Debug
Step 1: Paste the generated JWT token to the JWT.Io
Address: https://jwt.io/
2.2.4. Source
Github: Source
3. Create the Windows Zoom Client App
Here is only 4 steps to building up your Windows Zoom Client App. For detailed information, you can check the Zoom Client SDK document[7].
Step 1: Download the C# Wrap Zoom Client SDK
https://marketplace.zoom.us/docs/sdk/native-sdks/windows/c-sharp-wrapper
Step 2: Open the Projoect
File: zoom_sdk_c_sharp_wrap.sln
Step 3: Change the Startup project as zoom_sdk_demo
Step 4: Setup the Configure as Release and x86 and Run
Currently, the SDK only supports the Release mode and x86 platform [ref].
(Edit)
Past the JWT Token to the App Token
4. Troubleshooting tips
In trouble on application hangs after input the App token?
The issue is usually caused by wrong metadata in the payload in the JWT, such as
missing the required fields,
wrong value setup for the metadata of iat, tokenExp or exp,
another wrong value case is too short expired duration, in general, for testing, we can set the expired duration in 1 day,
and more[4].
5. References
The SDK Home, https://developers.zoom.us/
Essential guides, https://marketplace.zoom.us/docs/sdk/video/windows/essential
How to create a sample JWT for the Client SDK, https://zoomdevelopersupport.zendesk.com/hc/en-us/articles/360056168291-How-to-create-a-sample-JWT-for-the-Client-SDK
I’m getting an invalid Token, https://marketplace.zoom.us/docs/sdk/native-sdks/auth/troubleshoot#im-getting-an-invalid-token
A C# class module for generating JWT token, https://devforum.zoom.us/t/how-to-create-jwt-token-using-rest-api-in-c/6620/20
The Client SDK Document, https://marketplace.zoom.us/docs/sdk/native-sdks/introduction
Audio control, https://marketplace.zoom.us/docs/sdk/video/web/essential/video
Zoom SDK, Authentication, https://marketplace.zoom.us/docs/sdk/native-sdks/auth
Windows SDK, https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/
C# Wrap, https://marketplace.zoom.us/docs/sdk/native-sdks/windows/c-sharp-wrapper