I download the Android SDK of version [v5.0.24437.0708]. When running the sample project, I past the generated JWT from [https://jwt.io/#libraries-io] webside with below paylaod:
{
“appKey”: “string”, // sdk key
“iat”: long, // access token issue timestamp
“exp”: long, // access token expire time
“tokenExp”: long // token expire time
}
It always raise error onZoomSDKInitializeResult, errorCode=1, internalErrorCode=0
Thanks for using Zoom SDK. Based on the error code, it seems like the JWT token is invalid. Could you provide a sample of your payload(without the appKey)?
BTW, I also tried to calculate the JWT from java codes with io.jsonwebtoken.Jwts. But, I found the result is different from the one i generated from [https://jwt.io/#libraries-io] with same input. Pls advise it. See below codes in java
Thanks for the reply and the code snippet. The timestamp in the JWT token should be in seconds, and the “exp” should be at most 48 hours from “iat” and the “tokenExp” should be at least 30 minutes from “iat”.
Hi Carson,
I have the same problem and I tried your solution but I still get the same error Failed to initialize zoom SDK Error:1, InternalErrorCode = 0
this is my payload:
{
“appKey”: “SDK_KEY”,
“iat”: 1599215 ,
“exp”: 1599350 ,
“tokenExp”: 3600
}
The issue appears to be with your values being some point in January of 1970. For reference, current epoch time as I am writing this response is 1599236975. The tokenExp value should be in epoch time as well.
Hi @jon.zoom,
Thanks for replying I converted the time from milliseconds to seconds it’s today’s date but in seconds I will try it again in milliseconds.