Failed to initialize Zoom SDK error code 124

i am try to active join meeting in my flutter app
i used V6.2.0 for mobileRTC .
this is required a JWT token, and i try to get it by call this method

getJWTToken{
final iat = DateTime.now().millisecondsSinceEpoch ~/ 1000;
        final exp = iat + 60 * 60 * 2; // 2 hours expiry

        final oPayload = {
          'sdkKey': "IetSuceoT_6wtzYbW3zmXw",
          'role': 0,
          'iat': iat,
          'exp': exp,
          'tokenExp': exp // match token expiration
        };

// Create JWT token
        final jwt = JWT(
          oPayload,
          header: {
            'alg': 'HS256',
            'typ': 'JWT',
          },
        );

        final jwtToken = jwt.sign(SecretKey(""));
        print('JWT Token: $jwtToken');
return jwtToken;
}

and the output it like
jwtToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiJJZXRTdWNlb1RfNnd0elliVzN6bVh3Iiwicm9sZSI6MCwiaWF0IjoxNzI3NjI0MzEzLCJleHAiOjE3Mjc2MzE1MTMsInRva2VuRXhwIjoxNzI3NjMxNTEzfQ.KADTl_Viig-q-1eWcPbY5XaZvdhdHEHmmf7p30egbkA

i used Client ID and Client Secret
@chunsiong.zoom

@myroomkw sorry before you jump into the issue, what are you trying to do here?

Are you using Video SDK or Meeting SDK?
Only Video SDK supports flutter.

Meeting SDK does not support flutter.
The JWT token is generated using Meeting SDK credentials, and should only be used with Meeting SDK.

I know. I’m using MethodChannel to call my Android native code in my Flutter app. I downloaded MobileRTC from the marketplace, and when calling it, it requires a JWT token, but I only have the Client ID and Client Secret. After searching for JWT, I found the method above that takes the Client ID and Client Secret and returns a JWT token. However, when initializing Zoom, I get this error.

@myroomkw I don’t understand.

Have you tried using the token on just a regular android meeting SDK first?

yes i do i run a regular android meeting SDK but gettinng the error

Failed to initialize Zoom SDK. Error: 1, internalErrorCode=0

i get the jwt token from above screen and still get the error
Failed to initialize Zoom SDK. Error: 1, internalErrorCode=0

any update??

@chunsiong.zoom

@myroomkw

You are missing required fields in the token

applet and tokenExp

based on my info the applet meen the my app name in Marketplace
i add it and still the same error.

also make applet is clientID and still the same error
Failed to initialize Zoom SDK. Error: 1, internalErrorCode=0
@chunsiong.zoom

@myroomkw sorry that was an auto correct.

appKey

Please check out the docs for the specific parameters needee

@myroomkw there are also some rules on the iat and expiry. I won’t mention them here, refer to the link.

They cannot all be at the same time

thanks worked for my .

the solution

the payload must like this

{
  "sdkKey": "client id",
  "appKey": "client id",
  "tokenExp": 1728056541,
  "name": "mo sedky",
  "role": 0,
  "exp": 1727885541,
  "iat": 1727883741
}

notes for tokenExp,exp and iat.

  1. iat (Issued At): This represents the time the token was created, given in Unix epoch time (seconds since 1970). It helps validate when the token was generated.

  2. exp (Expiration Time): This is the time when the token will expire. For the Meeting SDK, the exp value should be at least 1800 seconds (30 minutes) greater than the iat value but must not exceed 48 hours from the iat.

  3. tokenExp (Token Expiry): This is the expiration time of the token used in SDK requests. It should follow the same rules as exp, with a minimum of 1800 seconds from iat and a maximum of 48 hours from iat. Typically, the exp and tokenExp values are set to the same time​