errorCode=1, internalErrorCode=0

Description
I live in Peru, and I got this: ‘onZoomSDKInitializeResult, errorCode=1, internalErrorCode=0’ when I use JWT to use sdk in android.
I used the SDK Secret and API directly to check if these values were working or not, and it was successful. However, I must use the JWT to use the SDK, not directly. I verified the account that I have and it is BUSINESS, or I think so because I see this value in the type of account which it appears in my profile:

I am using the following parts to generate the JWT token, according to instructions in this link https://marketplace.zoom.us/docs/sdk/native-sdks/android/mastering-zoom-sdk/sdk-initialization:

HEADER

{
“alg”: “HS256”,
“typ”: “JWT”
}

PAYLOAD
{
“appKey”: “XXXXXKGwx”,
“iat”: 1587579377,
“exp”: 1587581177,
“tokenExp”: 1800
}

VERIFY SIGNATURE

HMACSHA256(
base64UrlEncode(header) + “.” +
base64UrlEncode(payload),
XXXXXoylt
)

I want to know what validation or additional information I need because I have verified the JWT many times, even I tried change the order of claims keys in the payload but I wasn’t successful.

Which version?
Zoom SDK Android v4.6.15801.0403

Smartphone (please complete the following information):

  • Device: Huawei

  • OS: Android 9

  • Version EMUI version 9.1.0

Hi BJuniorC,

Thanks for using Zoom SDK. The tokenExp would be a timestamp rather than a time, please have a try with the following:
{
“appKey”: “XXXXXKGwx”,
“iat”: 1587579377,
“exp”: 1587581177,
“tokenExp”: (timestamp here=1587579377+1800)
}
Hope this helps. Thanks!

Thanks, I did the change but it didn’t work again. I realized that the value for “exp” and “tokenExp” had to be more than 30 minutes because when the difference between your actual time and the value in these keys is 30 minutes or lower, the token won’t work. I put a value more than 30 minutes, and it worked. I think that is unnecessary use 2 keys like “exp” and “tokenExp” which have the same value, because it can be used for 1, but it is only a suggestion for you. I already resolved my problem but with that fact I learnt in the process. Thanks again.

Hi

Thanks for sharing this and glad to hear that it is working. Yes, those fields require to be more than 30 minutes. Happy Zooming! :slight_smile: