AuthWithJwtToken 5

Problem: AuthWithJwtToken 5

I viewed the previous answered post about the same problem. BUT the answer is not clear and I have no idea on how to fix it. It says I have to generate JWT token manually, but I don’t know where should I find the SDK key and secret, from marketplace? and which type of app from marketplace? How do I organize those keys to generate the token?

However, the readme and docs are so vague that make people have no clue to go next step! I just realized that the info of how to use this sdk is insufficient and hard to get it started.

1 Like

Hi @ChrixH,

Thanks for using Zoom SDK. Here are the steps to get the SDK key/secret and generate the JWT token:

  1. SDK key/secret: Follow the instruction here to create an SDK app and get the SDK key/secret: https://marketplace.zoom.us/docs/guides/build/sdk-app
  2. Once you have the SDK key/secret, follow this template to compose your payload for SDK initialization(https://github.com/zoom/zoom-sdk-electron/blob/master/CHANGELOG.md#new-sdk-initialization-method-using-jwt-token):
  • Header
{
  "alg": "HS256",
  "typ": "JWT"
}
  • Payload
{
	  "appKey": "string", // Your SDK key
         "iat": long, // access token issue timestamp
         "exp": long, // access token expire timestamp
         "tokenExp": long // token expire timestamp, MIN:30 minutes
}

The minimum value of tokenExp should be at least 30 minutes, and the exp should be later than the tokenExp, otherwise, SDK will reject the authentication request.
** Signature

HMACSHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  "Your SDK secret here"
)

You could use jwt.io to generate the JWT token for testing.

Thanks for the feedback. We are working on improving the doc and will have a better doc as soon as we can.

Thanks!

I’ve tried to use the jwt.io - the screen simply flashes the loading screen after I click the SDKAuth, and then bounces back…