# Dynamic init Zoom SDK

**URL:** <https://devforum.zoom.us/t/dynamic-init-zoom-sdk/15192>\
**Category:** Android\
**Created:** [April 28, 2020, 7:49am UTC](https://devforum.zoom.us/t/dynamic-init-zoom-sdk/15192 "2020-04-28T07:49:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shingshing6](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@shingshing6](https://devforum.zoom.us/u/shingshing6)\
**Post date:** [April 28, 2020, 7:49am UTC](https://devforum.zoom.us/t/dynamic-init-zoom-sdk/15192/1 "2020-04-28T07:49:23Z")

</div>

Hi, may I know if there is a method to init the SDK in a dynamic way?  
If I put the key/secret/JWT token in the app, it needs to rebuild every time when the key/token are expired.  
Therefore, i would like to know any dynamic init suggestions?

---

<div class="post-metadata">

**Author:** ![shingshing6](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@shingshing6](https://devforum.zoom.us/u/shingshing6)\
**Post date:** [April 29, 2020, 10:10am UTC](https://devforum.zoom.us/t/dynamic-init-zoom-sdk/15192/2 "2020-04-29T10:10:10Z")

</div>

In order to init the SDK dynamically, i would like to know how to init the SDK every time when i open the activity?

It seems the SDK will not remove/destroy after i click the leave button. However, it seems IOS can do it.

Please advise. Thanks.

---

<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 1, 2020, 5:58am UTC](https://devforum.zoom.us/t/dynamic-init-zoom-sdk/15192/3 "2020-05-01T05:58:50Z")

</div>

Hi [shingshing6](https://devforum.zoom.us/u/shingshing6),

It is not recommended to hardcode any credentials in your app, please see our disclaimer:[https://github.com/zoom/zoom-sdk-android#disclaimer](https://github.com/zoom/zoom-sdk-android#disclaimer)

It is recommended only to use your app to consume the key/secrets or tokens, not storing or generating them. If you have a backend, you may generate your token there and pass it to your SDK app to use it.

Normally you only need to init SDK once, before you start using any of the SDK features. However, if you are using JWT token, you could set the expire time, you will need to re-auth the SDK.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![shingshing6](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@shingshing6](https://devforum.zoom.us/u/shingshing6)\
**Post date:** [May 4, 2020, 2:11am UTC](https://devforum.zoom.us/t/dynamic-init-zoom-sdk/15192/4 "2020-05-04T02:11:06Z")

</div>

Hi Carson,

So, how to re-auth the SDK? any code reference?

Thanks.

---

<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 6, 2020, 7:35am UTC](https://devforum.zoom.us/t/dynamic-init-zoom-sdk/15192/5 "2020-05-06T07:35:20Z")

</div>

Hi [shingshing6](https://devforum.zoom.us/t/dynamic-init-zoom-sdk/15192/4),

Thanks for the reply. You could use the interface to check whether the auth has expired or not: [https://zoom.github.io/zoom-sdk-android/us/zoom/sdk/ZoomSDK.html#isInitialized--;](https://zoom.github.io/zoom-sdk-android/us/zoom/sdk/ZoomSDK.html#isInitialized--;) If it indicates that the auth has expired, you could just re-auth the SDK like the normal SDK authentication.

Thanks!

---

<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:05pm UTC](https://devforum.zoom.us/t/dynamic-init-zoom-sdk/15192/6 "2020-08-21T21:05:16Z")

</div>

Closed on August 21, 2020, 9:05pm UTC


