# Android SDK not initializing with JWT token after upgrade to 5.16.10

**URL:** <https://devforum.zoom.us/t/android-sdk-not-initializing-with-jwt-token-after-upgrade-to-5-16-10/102883>\
**Category:** Meeting SDK\
**Created:** [January 31, 2024, 10:25am UTC](https://devforum.zoom.us/t/android-sdk-not-initializing-with-jwt-token-after-upgrade-to-5-16-10/102883 "2024-01-31T10:25:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![amany.ebrahim303](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/amany.ebrahim303/32/56121_2.png) [@amany.ebrahim303](https://devforum.zoom.us/u/amany.ebrahim303)\
**Post date:** [January 31, 2024, 10:25am UTC](https://devforum.zoom.us/t/android-sdk-not-initializing-with-jwt-token-after-upgrade-to-5-16-10/102883/1 "2024-01-31T10:25:46Z")

</div>

update Zoom SDK to 5.16.10  
and I get error code 1 and internal code 0  
this how I initialize sdk

```auto
 fun initSDK(context: Context, callback: InitAuthSDKCallback) {
        zoomSDK = ZoomSDK.getInstance()
        if (!zoomSDK.isInitialized) {
            initAuthSDKCallback = callback

            val initParams = ZoomSDKInitParams()
            initParams.jwtToken = generateToken()
            initParams.enableLog = true
            initParams.domain = WEB_DOMAIN

            zoomSDK.initialize(context, callback, initParams)
        }
    }

```

and method to get jwttoken

```auto
private fun generateToken(): String {
    var token = ""
    try {
        val algorithm: Algorithm = Algorithm.HMAC256(BuildConfig.zoomSecretKey)
        val expirationDate =
            Date(System.currentTimeMillis() + 3600000) // Set the token expiration time (1 hour in this example)
        token = JWT.create()
            .withIssuer(BuildConfig.zoomClientKey)
            .withExpiresAt(expirationDate)
            .sign(algorithm)
    } catch (e: Exception) {
        e.printStackTrace()
    }
    return token
}

```

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 2, 2024, 8:44am UTC](https://devforum.zoom.us/t/android-sdk-not-initializing-with-jwt-token-after-upgrade-to-5-16-10/102883/2 "2024-02-02T08:44:32Z")

</div>

@amany.ebrahim303 could you share a sample of the generated token?

You will need the necessary key value pairs listed here

| Key | Necessity | Value |
| --- | --- | --- |
| `appKey` | Required (native)\* | **Optional for web.** Your Meeting SDK app type’s SDK Key if you have one, or client ID if you do not. |
| `iat` | Required | The token issue timestamp. |
| `exp` | Required | The JWT expiration timestamp. Mininum = 1800 seconds greater than the `iat` value, maximum recommended = 48 hours greater than the `iat` value. In epoch format. |
| `tokenExp` | Required | SDK authenticated session expiration timestamp. Minimum = 1800 seconds greater than the `iat` value, maximum recommended = 48 hours greater than `iat` value. In epoch format. |

> **[Meeting SDK Auth](https://developers.zoom.us/docs/meeting-sdk/auth/#payload)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

---

<div class="post-metadata">

**Author:** ![amany.ebrahim303](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/amany.ebrahim303/32/56121_2.png) [@amany.ebrahim303](https://devforum.zoom.us/u/amany.ebrahim303)\
**Post date:** [February 15, 2024, 11:01am UTC](https://devforum.zoom.us/t/android-sdk-not-initializing-with-jwt-token-after-upgrade-to-5-16-10/102883/3 "2024-02-15T11:01:33Z")

</div>

@chunsiong.zoom  
sample of jwt Token :  
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJDN0V5N1dlVkhYYjBldTRnYW9MZXN2QUVQaGRuNXV5MGd0dXQiLCJleHAiOjE3MDc5OTgwNjF9.ZzEQtjtI92cqn3FAnQcARiUBq4IrqLZrMEPhZwZnV4k

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 15, 2024, 11:49am UTC](https://devforum.zoom.us/t/android-sdk-not-initializing-with-jwt-token-after-upgrade-to-5-16-10/102883/4 "2024-02-15T11:49:10Z")

</div>

@amany.ebrahim303 this key is invalid as it is missing all the payload such as Appkey, iat, exp and tokenExp.

Please refer to [Meeting SDK Auth](https://developers.zoom.us/docs/meeting-sdk/auth/#payload) on the necessary values in the payload

---

<div class="post-metadata">

**Author:** ![amany.ebrahim303](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/amany.ebrahim303/32/56121_2.png) [@amany.ebrahim303](https://devforum.zoom.us/u/amany.ebrahim303)\
**Post date:** [February 15, 2024, 12:11pm UTC](https://devforum.zoom.us/t/android-sdk-not-initializing-with-jwt-token-after-upgrade-to-5-16-10/102883/5 "2024-02-15T12:11:48Z")

</div>

thanks for reply @chunsiong.zoom

 ![Screenshot 2024-02-15 at 2.14.52 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/c/ec516a521618f96aae7f6bff8d5ff98c2324a080.png)

what about that not working also

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 19, 2024, 3:02am UTC](https://devforum.zoom.us/t/android-sdk-not-initializing-with-jwt-token-after-upgrade-to-5-16-10/102883/6 "2024-02-19T03:02:53Z")

</div>

@amany.ebrahim303

1646937553 timestamp is in 2022, March 10th. This has probably expired close to 2 years ago
