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

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

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!

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
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”}

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. :slightly_smiling_face:

Thanks!

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}

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!

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