onZoomSDKInitializeResult, errorCode=1, internalErrorCode=0 when using JWT token

Trying to start the sample app with JWT token from the App Credentials page, and all I get is a toast saying “onZoomSDKInitializeResult, errorCode=1, internalErrorCode=0” with no indication of what is wrong.

Which version?

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Download demo app
  2. Set credentials
  3. Run app
  4. See error


Smartphone (please complete the following information):

  • Api 29 Emulator

Additional context
Log: https://drive.google.com/file/d/1NQmDDllWXtkGz_Xh0_DIzSKev0mYNHIe/view?usp=sharing

Hi @flashcall,

Thanks for the post. The error code 1 means “Invalid Arguments”, which means the JWT token is not valid. Are you following the instruction https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/sdk-initialization to generate the JWT token?

I used the token generated at https://marketplace.zoom.us/user/build where I created a JWT app. I found it in the App Credentials sections.

Since I noticed it has different keys in it than the ones specified in the docs I tried generating one myself like the ones in the docs, but that also failed.

The token generated by JWT app “App Credentials” has the following payload:

  "aud": null,
  "iss": "Sxxxxxxxxxxxxxxx",
  "exp": 1591088056,
  "iat": 1591082664

The SDK docs say it should have:

  	"appKey": "string", // Your SDK key
    "iat": long, // access token issue timestamp
    "exp": long, // access token expire timestamp, iat + a time less than 48 hours
	"tokenExp": long // token expire time, MIN:1800 seconds

Both fail to authenticate me, so my questions is, what is the correct payload structure ?

Thank you.

Hi @flashcall,

The JWT token generated from the JWT app is for Zoom API.

If you would like to authenticate SDK using JWT token, you will need the 2nd payload, and you will need to place SDK key in the “appKey”. Please have a try.