# Can't create Session with Error code 2014

**URL:** <https://devforum.zoom.us/t/cant-create-session-with-error-code-2014/59897>\
**Category:** Android\
**Created:** [November 8, 2021, 3:00am UTC](https://devforum.zoom.us/t/cant-create-session-with-error-code-2014/59897 "2021-11-08T03:00:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ricky.simp](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ricky.simp/32/32479_2.png) [@ricky.simp](https://devforum.zoom.us/u/ricky.simp)\
**Post date:** [November 8, 2021, 3:00am UTC](https://devforum.zoom.us/t/cant-create-session-with-error-code-2014/59897/1 "2021-11-08T03:00:01Z")

</div>

Hello, i’m making a demo app with Video SDK.

I didn’t know it was changed to InstantSDK instead of VideoSDK, so I struggled a lot at first ☹ Plz update api documentation…

Anyway, when trying to create a session, I don’t know what’s wrong.  
The docs says, if no matching session, SDK will create session for me.

I create a JWT token like this with `jjwt` using kotlin.  
Token is no problem when i checked in `https://jwt.io/#libraries-io`.

```auto
    val headers = HashMap<String, Any>().apply {
        put("alg", "HS256")
        put("typ", "JWT")
    }
    Timber.tag("JWT").d("headers : $headers")

    val payloads = HashMap<String, Any>().apply {
        putAll(
            arrayOf(
                "app_key" to sdkKey, "version" to 1, "user_identity" to userName,
                "iat" to iat, "exp" to exp, "tpc" to sessionName
            )
        )
    }
    Timber.tag("JWT").d("payloads : $payloads")

    val key = Keys.hmacShaKeyFor(sdkSecret.toByteArray())
    val jwt = Jwts.builder()
        .setHeader(headers)
        .setClaims(payloads)
        .signWith(key, SignatureAlgorithm.HS256)
        .compact()

    Timber.tag("JWT").d(jwt)

```

`sdkKey` is my app’s SDK Key, and `sdkSecret` is my app’s SDK secret.

```auto
                val sessionContext = ZoomInstantSDKSessionContext().apply {
                    sessionName = "mysession_oneboard"
                    userName = "ricky"
                    token = createJWT(sessionName, userName)
                    audioOption = ZoomInstantSDKAudioOption().apply {
                        connect = true
                        mute = true
                    }
                    videoOption = ZoomInstantSDKVideoOption().apply {
                        localVideoOn = false
                    }
                }
                zoom.joinSession(sessionContext)
                zoom.session?.run {
                    Timber.tag("Session").d("name : $sessionName")
                    Timber.tag("Session").d("password: $sessionPassword")
                    Timber.tag("Session").d("host : $sessionHost")
                    Timber.tag("Session").d("mySelf : ${mySelf.userName}")
// Timber.tag("Session").d("hostname : $sessionHostName")
                }

```

And this is the source code, when i use `joinSession()`. I know `sessionName`, `userName`, `token` are required, but i don’t find a problem. So add `audioOption`, `videoOption`

And my log says below.

```auto
D/JWT: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBfa2V5IjoiVDBXRHlGM0gxaGxDMzBKRUsyc2ZUVzlTOXZ3Wm01ZVFRWU5vIiwidHBjIjoibXlzZXNzaW9uX29uZWJvYXJkIiwidXNlcl9pZGVudGl0eSI6InJpY2t5IiwiZXhwIjoxNjM2MzUzODI3LCJ2ZXJzaW9uIjoxLCJpYXQiOjE2MzYzMzk0Mjd9.bf0fXMNscPkxySM5DPFYNOm-UNGMksGMk7JKc_LFRlA
D/Session: name : mysession_oneboard
    password: null
    host : null
D/Session: mySelf : 
D/ZoomListener: onError(2014)
D/ZoomListener: onSessionLeave()

```

I found the error code `2014` means `Errors_Session_Invalid_Param`. But i don’t know what is problem.

I don’t know English well, so I’m sorry if I said it rudely.  
Please solve it quickly. Thank you.

---

<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:** [November 9, 2021, 10:45pm UTC](https://devforum.zoom.us/t/cant-create-session-with-error-code-2014/59897/2 "2021-11-09T22:45:47Z")

</div>

Hi @ricky.simp, thanks for using our SDK.

> I didn’t know it was changed to InstantSDK instead of VideoSDK, so I struggled a lot at first ☹ Plz update api documentation…

This is because the documentation is based on the latest version of the SDK. We are working on providing version-specific documentation in the future, but it may take some time for us to be able to do so. Could you please try downloading the latest version of the SDK from the Marketplace? I’m not seeing anything immediately obvious about your implementation that would be causing this, so maybe there is a bug in the version of the SDK that you are using now.

The only other potential issue I can think of is whether or not the JWT you are using was valid at the time of your test. The token you provided had an `exp` value of `1636353827` (in epoch time). Can you confirm that this error is still present when you are at a time greater than `iat` and less than `exp`?

> I don’t know English well, so I’m sorry if I said it rudely.

Absolutely no problem, your post was very easy to understand and did not come off as rude! 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![ricky.simp](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ricky.simp/32/32479_2.png) [@ricky.simp](https://devforum.zoom.us/u/ricky.simp)\
**Post date:** [November 10, 2021, 2:05am UTC](https://devforum.zoom.us/t/cant-create-session-with-error-code-2014/59897/3 "2021-11-10T02:05:57Z")

</div>

@jon.zoom  
Thank you for replying. According to what you said, I thought my SDK version could be a problem.

Where can i download the latest version of the SDK?  
I downloaded in `Zoom Developer` \> `My Apps` \> `Select My App` \> `download` \> `Android latest SDK` \> `5.7.6.1918`  
But, i can’t find ’ ZoomVideoSDKInitParams`And, in`Marketplace`i can't find VideoSDK searching with`video`, `session`…

If i’m wrong, plz teach me where can i download?

Thanks!

P.S.  
from my jwt token when i first writing issue, i made `iat` by `System.currentTieminMillis() / 1000` to make `int`. And `exp` made by int `iat` + `3600 * 4` (4 hours).  
So, i decoded my `jwt token` in [jwt.io](http://jwt.io). The result is as follows.

```auto
  "exp": 1636353827,
  "iat": 1636339427

```

`iat` is less than `exp`, and i made `iat` by `System.currentTimeinMillis() / 1000`. So, i think neither `iat` or `exp` is not problem.

---

<div class="post-metadata">

**Author:** ![ricky.simp](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ricky.simp/32/32479_2.png) [@ricky.simp](https://devforum.zoom.us/u/ricky.simp)\
**Post date:** [November 10, 2021, 3:55am UTC](https://devforum.zoom.us/t/cant-create-session-with-error-code-2014/59897/4 "2021-11-10T03:55:38Z")

</div>

@jon.zoom  
Sorry, i read `https://marketplace.zoom.us/docs/sdk/video/developer-accounts`…

😰My fault…  
Bcuz I added `Developer Account`, so i skipped reading `video sdk/developer-accouts`.

I read carefully `SDK documentation`.

I think i found it.

I’ll try it whenever I have time and tell you.

I’m sorry, and Thank you.

When you read it, Have a nice day 😃

---

<div class="post-metadata">

**Author:** ![ricky.simp](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ricky.simp/32/32479_2.png) [@ricky.simp](https://devforum.zoom.us/u/ricky.simp)\
**Post date:** [November 10, 2021, 6:15am UTC](https://devforum.zoom.us/t/cant-create-session-with-error-code-2014/59897/5 "2021-11-10T06:15:32Z")

</div>

@jon.zoom

I checked.

EVERYTHING IS OKAY!!!

Thank you very much.

Have a nice day 😃

---

<div class="post-metadata">

**Author:** ![asimraza0938](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/asimraza0938/32/18433_2.png) [@asimraza0938](https://devforum.zoom.us/u/asimraza0938)\
**Post date:** [November 10, 2021, 6:18pm UTC](https://devforum.zoom.us/t/cant-create-session-with-error-code-2014/59897/6 "2021-11-10T18:18:51Z")

</div>

Thanks again from my side too…

---

<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:** [November 10, 2021, 9:57pm UTC](https://devforum.zoom.us/t/cant-create-session-with-error-code-2014/59897/7 "2021-11-10T21:57:32Z")

</div>

That is great to hear that everything is working now!

Please don’t hesitate to reach back out in a new thread with any additional questions. 🙂

---

<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:** [December 11, 2021, 7:58am UTC](https://devforum.zoom.us/t/cant-create-session-with-error-code-2014/59897/8 "2021-12-11T07:58:14Z")

</div>

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