Token authorization does not work in the demo app. It returns error code 15. Token works fine and tested with Zoom API.
To Reproduce(If applicable)
Steps to reproduce the behavior:
- Run the demo app.
- Enter token.
- Click the SDKAuth button.
- See the error at the console output.
If applicable, add screenshots to help explain your problem.
Thanks for using Zoom SDK. We have followed the steps you provided but unfortunately we are not able to reproduce this error. May I ask how do you generate your JWT token? Could you provide the payload(Without the keys & secret)?
@alex.erygin you need to get SDK Key and Secret for Desktop SDKs, then generate JWT token yourself with them.
Your JWT token works for Zoom API because it’s built from Zoom API Key and Secret and will not work for Desktop SDKs.
Hi @carson.zoom! Thank you for response.
@desko27, can you provide payload example? I Use SDK Key and Secret, but it is still not work. I think problem is wrong payload.
Thanks for the reply. Yes, the JWT and the payload requires a specific format, here is an example:
"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
base64UrlEncode(header) + "." +
"Your SDK secret here"
You may find the info in https://github.com/zoom/zoom-sdk-electron/blob/master/CHANGELOG.md.
Please have a try. Thanks!
jsonwebtoken npm package is really useful to handle JWT generation.
This is what works for me:
const jwt = require('jsonwebtoken')
const ZOOM_SDK_KEY = 'your zoom sdk key'
const ZOOM_SDK_SECRET = 'your zoom sdk secret'
// make jwt token from sdk key and secret
const timestampIssued = Math.floor(Date.now() / 1000) - 60 // ms -> s
const timestampExpires = timestampIssued + 86400 // 24h
const token = jwt.sign(