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

**URL:** https://devforum.zoom.us/t/onzoomsdkinitializeresult-errorcode-1-internalerrorcode-0-when-using-jwt-token/19372
**Category:** Android
**Created:** [May 28, 2020, 10:15am UTC](https://devforum.zoom.us/t/onzoomsdkinitializeresult-errorcode-1-internalerrorcode-0-when-using-jwt-token/19372 "2020-05-28T10:15:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![flashcall](https://avatars.discourse-cdn.com/v4/letter/f/b5e925/32.png) [@flashcall](https://devforum.zoom.us/u/flashcall)
#### Post date: [May 28, 2020, 10:15am UTC](https://devforum.zoom.us/t/onzoomsdkinitializeresult-errorcode-1-internalerrorcode-0-when-using-jwt-token/19372/1 "2020-05-28T10:15:30Z")

</div>

**Description**  
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?**  
v4.6.21666.0429

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

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

**Screenshots**

> **[screenshot.png](https://drive.google.com/file/d/1gEpMnl3KiyEFb-2ua3rFPgG3FsUvp_6n/view?usp=sharing)**
>
> Google Drive file.

**Smartphone (please complete the following information):**

- Api 29 Emulator

**Additional context**  
Log: [https://drive.google.com/file/d/1NQmDDllWXtkGz\_Xh0\_DIzSKev0mYNHIe/view?usp=sharing](https://drive.google.com/file/d/1NQmDDllWXtkGz_Xh0_DIzSKev0mYNHIe/view?usp=sharing)

---

<div class="post-metadata">

### Author: ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)
#### Post date: [May 29, 2020, 7:30am UTC](https://devforum.zoom.us/t/onzoomsdkinitializeresult-errorcode-1-internalerrorcode-0-when-using-jwt-token/19372/2 "2020-05-29T07:30:55Z")

</div>

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](https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/sdk-initialization) to generate the JWT token?

---

<div class="post-metadata">

### Author: ![flashcall](https://avatars.discourse-cdn.com/v4/letter/f/b5e925/32.png) [@flashcall](https://devforum.zoom.us/u/flashcall)
#### Post date: [June 2, 2020, 7:29am UTC](https://devforum.zoom.us/t/onzoomsdkinitializeresult-errorcode-1-internalerrorcode-0-when-using-jwt-token/19372/3 "2020-06-02T07:29:04Z")

</div>

I used the token generated at [https://marketplace.zoom.us/user/build](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:

```auto
{
  "aud": null,
  "iss": "Sxxxxxxxxxxxxxxx",
  "exp": 1591088056,
  "iat": 1591082664
}

```

The SDK docs say it should have:

```auto
{
  	"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.

---

<div class="post-metadata">

### Author: ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)
#### Post date: [June 3, 2020, 11:19am UTC](https://devforum.zoom.us/t/onzoomsdkinitializeresult-errorcode-1-internalerrorcode-0-when-using-jwt-token/19372/4 "2020-06-03T11:19:51Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)
#### Post date: [August 21, 2020, 9:49pm UTC](https://devforum.zoom.us/t/onzoomsdkinitializeresult-errorcode-1-internalerrorcode-0-when-using-jwt-token/19372/5 "2020-08-21T21:49:25Z")

</div>


