# Error code 2003 when trying to join a session from fragment instead of activity

**URL:** <https://devforum.zoom.us/t/error-code-2003-when-trying-to-join-a-session-from-fragment-instead-of-activity/54732>\
**Category:** Android\
**Created:** [July 26, 2021, 1:42pm UTC](https://devforum.zoom.us/t/error-code-2003-when-trying-to-join-a-session-from-fragment-instead-of-activity/54732 "2021-07-26T13:42:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahulkashyap1506](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rahulkashyap1506/32/23690_2.png) [@rahulkashyap1506](https://devforum.zoom.us/u/rahulkashyap1506)\
**Post date:** [July 26, 2021, 1:42pm UTC](https://devforum.zoom.us/t/error-code-2003-when-trying-to-join-a-session-from-fragment-instead-of-activity/54732/1 "2021-07-26T13:42:10Z")

</div>

**Description**  
After initializing the sdk I tried to join a session but instead get an error code 2003. I have tried running the sample code as well but that is connecting without any issues. I tried using same token from there as well but it did not work. The only difference is that I am using a fragment instead of activity.

**Which Android Video SDK version?**  
v1.1.0

**To Reproduce(If applicable)**  
Initialize and try to join a session inside fragment instead of activity

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

- Device: OnePlus 6T
- OS: Android 10

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [July 26, 2021, 6:04pm UTC](https://devforum.zoom.us/t/error-code-2003-when-trying-to-join-a-session-from-fragment-instead-of-activity/54732/2 "2021-07-26T18:04:40Z")

</div>

Hi @rahulkashyap1506, thanks for using our SDK.

The usage of a Fragment instead of an Activity should not have any impact on your ability to join or start a session. Can you please provide a code snippet showing how you are joining, as well as the payload of your JWT **with your developer credentials removed**?

Thanks!

---

<div class="post-metadata">

**Author:** ![rahulkashyap1506](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rahulkashyap1506/32/23690_2.png) [@rahulkashyap1506](https://devforum.zoom.us/u/rahulkashyap1506)\
**Post date:** [July 28, 2021, 1:10pm UTC](https://devforum.zoom.us/t/error-code-2003-when-trying-to-join-a-session-from-fragment-instead-of-activity/54732/3 "2021-07-28T13:10:45Z")

</div>

Hi @jon.zoom, I am using the below code. Here ZoomVideoSDKDelegate has been implemented to the main class.

Code:  
private fun sdkInitialization() {  
ZoomVideoSDK.getInstance().initialize(requireContext(), ZoomVideoSDKInitParams().apply {  
domain = “[https://zoom/us](https://zoom/us)”  
enableLog = true  
})  
ZoomVideoSDK.getInstance().addListener(this)  
}

private fun joinSession() {  
val params = ZoomVideoSDKSessionContext().apply {  
sessionName = topic  
userName = user  
sessionPassword = password  
token = JWTUtil().createJWTAccessToken(topic, password)  
audioOption = ZoomVideoSDKAudioOption().apply {  
connect = false  
mute = true  
}  
videoOption = ZoomVideoSDKVideoOption().apply {  
localVideoOn = false  
}  
}  
ZoomVideoSDK.getInstance().joinSession(params)  
}

Payload:  
{“app\_key”:"",“exp”:1627491957,“iat”:1627477557,“pwd”:“password”,“tpc”:“topic”,“user\_identity”:“client”}

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [July 28, 2021, 5:42pm UTC](https://devforum.zoom.us/t/error-code-2003-when-trying-to-join-a-session-from-fragment-instead-of-activity/54732/4 "2021-07-28T17:42:46Z")

</div>

Hi @rahulkashyap1506,

Thanks for providing the additional context. There should not be a `pwd` field on the JWT’s payload. Also, the `version` field appears to be missing. For more information, please see our [authentication documentation](https://marketplace.zoom.us/docs/sdk/video/auth). 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![rahulkashyap1506](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rahulkashyap1506/32/23690_2.png) [@rahulkashyap1506](https://devforum.zoom.us/u/rahulkashyap1506)\
**Post date:** [July 31, 2021, 2:30pm UTC](https://devforum.zoom.us/t/error-code-2003-when-trying-to-join-a-session-from-fragment-instead-of-activity/54732/5 "2021-07-31T14:30:03Z")

</div>

Hi @jon.zoom

Thanks for the quick reply. I have replaced the jwt as you suggested but I am still facing the same issue.

{“app\_key”:"",“exp”:1627750335,“iat”:1627735935,“tpc”:“topic”,“user\_identity”:“client”,“version”:1}

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [August 2, 2021, 6:18pm UTC](https://devforum.zoom.us/t/error-code-2003-when-trying-to-join-a-session-from-fragment-instead-of-activity/54732/6 "2021-08-02T18:18:23Z")

</div>

Hi @rahulkashyap1506,

Thanks for trying that. Upon closer investigation, there appears to be a typo in your domain. Instead of `https://zoom/us` can you try `https://zoom.us`?

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [September 2, 2021, 4:19am UTC](https://devforum.zoom.us/t/error-code-2003-when-trying-to-join-a-session-from-fragment-instead-of-activity/54732/7 "2021-09-02T04:19:17Z")

</div>

Closed on September 2, 2021, 4:19am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
