# ZoomInstantSDKSession create session error

**URL:** <https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920>\
**Category:** Video SDK\
**Created:** [December 8, 2020, 1:46pm UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920 "2020-12-08T13:46:17Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben5](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@ben5](https://devforum.zoom.us/u/ben5)\
**Post date:** [December 8, 2020, 1:46pm UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/1 "2020-12-08T13:46:17Z")

</div>

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);
```

---

<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:** [December 8, 2020, 11:09pm UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/2 "2020-12-08T23:09:20Z")

</div>

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](https://marketplace.zoom.us/docs/sdk/custom/auth#jwt) 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!

---

<div class="post-metadata">

**Author:** ![ben5](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@ben5](https://devforum.zoom.us/u/ben5)\
**Post date:** [December 11, 2020, 2:43pm UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/3 "2020-12-11T14:43:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![brians](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@brians](https://devforum.zoom.us/u/brians)\
**Post date:** [December 14, 2020, 1:19pm UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/4 "2020-12-14T13:19:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ben5](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@ben5](https://devforum.zoom.us/u/ben5)\
**Post date:** [December 14, 2020, 3:24pm UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/5 "2020-12-14T15:24:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![brians](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@brians](https://devforum.zoom.us/u/brians)\
**Post date:** [December 15, 2020, 8:30am UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/6 "2020-12-15T08:30:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [December 15, 2020, 6:55pm UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/7 "2020-12-15T18:55:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ben5](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@ben5](https://devforum.zoom.us/u/ben5)\
**Post date:** [December 15, 2020, 7:16pm UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/8 "2020-12-15T19:16:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [December 15, 2020, 7:17pm UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/9 "2020-12-15T19:17:46Z")

</div>

@ben5

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

Michael

---

<div class="post-metadata">

**Author:** ![sayanta2702](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sayanta2702/32/28630_2.png) [@sayanta2702](https://devforum.zoom.us/u/sayanta2702)\
**Post date:** [June 25, 2021, 9:51am UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/10 "2021-06-25T09:51:57Z")

</div>

@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

---

<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:** [June 25, 2021, 6:59pm UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/11 "2021-06-25T18:59:48Z")

</div>

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](https://devforum.zoom.us/faq).

Thanks!

---

<div class="post-metadata">

**Author:** ![sayanta2702](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sayanta2702/32/28630_2.png) [@sayanta2702](https://devforum.zoom.us/u/sayanta2702)\
**Post date:** [June 26, 2021, 1:04am UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/12 "2021-06-26T01:04:45Z")

</div>

@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

---

<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:** [June 28, 2021, 5:28pm UTC](https://devforum.zoom.us/t/zoominstantsdksession-create-session-error/37920/13 "2021-06-28T17:28:43Z")

</div>

Please continue posting only in the other thread. 🙂
