ZoomInstantSDKSession create session error

Getting error when attempting to create session.

ZoomInstantSDKSession *session = [[ZoomInstantSDK shareInstance] joinSession:sessionContext];

Version: zoom-instant-sdk-iOS-1.0.0.zip

To Reproduce:

  1. Download “zoom-instant-sdk-iOS-1.0.0.zip”
  2. Configure Xcode code signing
  3. define kAppToken in AppDelegate.h
  4. build/launch app on iOS device
  5. tap on “Create” button to load “CreateViewController”
  6. enter (or not enter) password (same error for both cases)
  7. tap on “Create” button
  8. onError:detail: delegate method gets called with “Errors_Invalid_Parameter” error and detail value of zero
  • Device: iPod Touch 6th Generation
  • OS: iOS v12.4.8

Here’s the code that configures the request to create a new session:

ZoomInstantSDKAudioOptions *audioOption = [ZoomInstantSDKAudioOptions new];
audioOption.connect     = YES;
audioOption.mute        = NO;

ZoomInstantSDKVideoOptions *videoOption = [ZoomInstantSDKVideoOptions new];
videoOption.localVideoOn = YES;

self.preProcesser = [[PreProcessHelper alloc] init];

// self.cameraAdapter = [[CameraCaptureAdapter alloc] init];
// self.picAdapter = [[SendPictureAdapter alloc] init];
// self.yuvAdapter = [[SendYUVAdapter alloc] init];

ZoomInstantSDKSessionContext *sessionContext = [ZoomInstantSDKSessionContext new];
sessionContext.sessionName        = _sessionNameTF.text;
sessionContext.userName        = _displayNameTF.text;
sessionContext.sessionPassword    = _passwordTF.text;
sessionContext.audioOption     = audioOption;
sessionContext.videoOption     = videoOption;
sessionContext.token           = kAppToken; //[self createJWTAccessToken];
sessionContext.preProcessorDelegate = self.preProcesser;

// sessionContext.videoSourceDelegate = self.picAdapter;

[ZoomInstantSDK shareInstance].delegate = self;

ZoomInstantSDKSession *session = [[ZoomInstantSDK shareInstance] joinSession:sessionContext];

NSLog(@"<%p>%s: _sessionNameTF.text: %@ session: %@", self, __PRETTY_FUNCTION__, _sessionNameTF.text, session);

Hi @ben5, thanks for using the dev forum.

Since you are passing in all of the required parameters, it appears that the issue may lie within your token’s content. Can you please confirm that you are following the format outlined here exactly?

If you are still running into this issue after confirming that, please post your JWT WITH ALL CREDENTIALS REPLACED WITH ARBITRARY DATA (e.g. `“app_key”: “ABCD”) so that we may look into other possible causes.

Thanks!

I followed the format outlined in the link you provided, but I’m still getting the invalid parameter error.

Here’s the JWT:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBfa2V5IjoiTVlfQVBJX0tFWSIsInZlcnNpb24iOjEsInVzZXJfaWRlbnRpdHkiOiJ1c2VyX2lkXzEyMzQiLCJpYXQiOjE2MDc2OTc0NDUsImV4cCI6MTYwNzg3MDI0NSwidHBjIjoiU2Vzc2lvbiBOYW1lIDAwMSJ9.yGPQEwGXr7t4yLtYEZUlCcfy4e9N4rt6VsQi9KwWtrI

Hi @ben5

I’m going through this as well and encountered a crash on joinSession : my problem was the “iat” & “exp” fields : the documentation indicates that they are strings but they should be numbers instead. An int that is the seconds since the epoch. Hope that helps.

I’m assuming my json format is correct for integer values:

{
“app_key”: “MY_API_KEY”,
“version”: 1,
“user_identity”: “user_id_1234”,
“iat”: 1607697445,
“exp”: 1607870245,
“tpc”: “Session Name 001”
}

I’m getting the “invalid parameter error” with a payload similar to the JSON above.

How are you generating the JWT? I’m using SwiftJWT. Also (not sure if it’s required) but I have a “tpc” that matches the session name in the joinSession() call.

1 Like

Hey @ben5,

@brians is correct that the “tpc” must match the session’s name the user is trying to join.
Can you verify these are the same?

Thanks!
Michael

Thanks @brians and @Michael_Condon , the “tpc” not matching the string that was being assigned to the “sessionName” parameter is what was causing the error.

1 Like

@ben5

Awesome! I am happy to hear it is working now.
Thank you @brians for saving the day! :slight_smile:

Michael

1 Like

@Michael_Condon We are getting the same problem but we made sure tpc is matching. We identified that changing the user_identity manually sometimes fixes the issue. Please provide a solution

Hi @sayanta2702,

Please do not post to multiple threads about the same issue, as it can make the forum more difficult to navigate for other users. For more information, please see our FAQ.

Thanks!

@jon.zoom I am extremely sorry sir. We were in a little bit of panic situation, and wanted to get in touch with a Staff as soon as possible

Please continue posting only in the other thread. :slightly_smiling_face: