Update skd version to v5.15.10.15778 unable to initialize sdk

I have updated my SDK version as mentioned in the heading but after doing this

final ZoomSDK mZoomSDK = ZoomSDK.getInstance();
        ZoomSDKInitParams initParams = new ZoomSDKInitParams();
        initParams.appKey = SDK_KEY;
        initParams.appSecret = SDK_SECRET;
        initParams.enableLog = true;
        initParams.logSize = 50;
        initParams.domain = WEB_DOMAIN;
        initParams.videoRawDataMemoryMode = ZoomSDKRawDataMemoryMode.ZoomSDKRawDataMemoryModeStack;
        mZoomSDK.initialize(this, this, initParams);

the params for appKey and secretKey does not exist.
How can i initialise my SKD now?

@prashant.nehra ,

For this version of SDK, you will need to sign the authentication token using SDK_KEY and SDK_SECRET and then pass it into initParams.jwtToken params

Hi @chunsiong.zoom ,
Thanks for the reply
The steps you have mentioned to follow i have done that and for testing purpose i have created JWT from https://jwt.io/
and pasted this as hardcoded text as

initParams.jwtToken = "HARD_CODED"

and when trying to print the log for

@Override
    public void onZoomSDKInitializeResult(int errorCode, int internalErrorCode) {
        Log.e(TAG, "onZoomSDKInitializeResult, errorCode=" + errorCode + ", internalErrorCode=" + internalErrorCode);
    }

the response i am getting is:

onZoomSDKInitializeResult, errorCode=1, internalErrorCode=0

what should be done now that can initialise SDK.

@prashant.nehra ,

Could you share your JWT token?

yes sure @chunsiong.zoom
JWT → eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBLZXkiOiJJcFJTS0RNSGdtejVTNlU4MlRWNHMydzh4cUNORU9RSEpwYlAiLCJpYXQiOjE2OTUwMjk1MDgsImV4cCI6MTY5NTAzOTUwOCwidG9rZW5FeHAiOjE4MDB9.dmmbkTiuF6BfX5GM1JVAmumqN_6UU-yQ0MMnkKMrwEI

@prashant.nehra

The tokenExp has to be identical to exp. It is currently 1800 which is not the correct epoch time. Try to use the same value as exp and it should work

@chunsiong.zoom
After your suggestion i have created the new
JWT → eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBLZXkiOiJJcFJTS0RNSGdtejVTNlU4MlRWNHMydzh4cUNORU9RSEpwYlAiLCJpYXQiOjE2OTUwMzQ5NDksImV4cCI6MTY5NTA0NDk0OSwidG9rZW5FeHAiOjE2OTUwMzQ5NDl9.oavOsBPKqhv6qznaZYBKiEGePcXcc5CfpjUOsUO9nTk

final ZoomSDK mZoomSDK = ZoomSDK.getInstance();
        ZoomSDKInitParams initParams = new ZoomSDKInitParams();
        /*initParams.appKey = SDK_KEY;
        initParams.appSecret = SDK_SECRET;*/
        initParams.jwtToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBLZXkiOiJJcFJTS0RNSGdtejVTNlU4MlRWNHMydzh4cUNORU9RSEpwYlAiLCJpYXQiOjE2OTUwMzQ5NDksImV4cCI6MTY5NTA0NDk0OSwidG9rZW5FeHAiOjE2OTUwMzQ5NDl9.oavOsBPKqhv6qznaZYBKiEGePcXcc5CfpjUOsUO9nTk";
        initParams.enableLog = true;
        initParams.logSize = 50;
        initParams.domain = WEB_DOMAIN;
        initParams.videoRawDataMemoryMode = ZoomSDKRawDataMemoryMode.ZoomSDKRawDataMemoryModeStack;
        mZoomSDK.initialize(this, this, initParams);

Still on onZoomSDKInitializeResult i am getting the response as →
onZoomSDKInitializeResult, errorCode=1, internalErrorCode=0

I don’t know how but after clearing the app data and header as

{
  "alg": "HS256",
  "typ": "JWT"
}

payload

{
  "appKey": ZOOM_MEETING_SDK_KEY_OR_CLIENT_ID,
  "iat": 1695036808,
  "exp": 1695046808,
  "tokenExp": 1695036808
}

and signature

HMACSHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  SECRET
)

again and now SDK is initializing
Thanks @chunsiong.zoom

great to hear that @prashant.nehra

1 Like

i have same problem with update with 5.14.5.13410 to 5.14.10.14272

Please anyone have any video video tutorial, any guide JWT token for new users ?

@JAFRI , please refer to this

1 Like