# Meeting SDK Upgrade Issue

**URL:** <https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596>\
**Category:** Meeting SDK\
**Tags:** faq-ios\
**Created:** [June 21, 2023, 3:56pm UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596 "2023-06-21T15:56:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nausher](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nausher/32/49617_2.png) [@nausher](https://devforum.zoom.us/u/nausher)\
**Post date:** [June 21, 2023, 3:56pm UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/1 "2023-06-21T15:56:47Z")

</div>

Facing issue on up-gradation of Meeting SDK to v5.14.11.8690 “Value of type ‘MobileRTCAuthService’ has no member ‘clientKey’ and Value of type ‘MobileRTCAuthService’ has no member ‘clientSecret’”

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [June 22, 2023, 8:53am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/2 "2023-06-22T08:53:37Z")

</div>

@nausher ,

this has been removed in 5.14. For SDK Auth, do sign a JWT token using your secret and key.

---

<div class="post-metadata">

**Author:** ![nausher](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nausher/32/49617_2.png) [@nausher](https://devforum.zoom.us/u/nausher)\
**Post date:** [June 22, 2023, 9:02am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/3 "2023-06-22T09:02:49Z")

</div>

> [@chunsiong.zoom](#):
>
> this has been removed in 5.14. For SDK Auth, do sign a JWT token using your secret and key.

Can you please any documentation how to sign a JWT Token.

---

<div class="post-metadata">

**Author:** ![purushottaminorbit26](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/purushottaminorbit26/32/49538_2.png) [@purushottaminorbit26](https://devforum.zoom.us/u/purushottaminorbit26)\
**Post date:** [June 22, 2023, 9:08am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/4 "2023-06-22T09:08:10Z")

</div>

i have also same problem please give us detail code snippet for this …

---

<div class="post-metadata">

**Author:** ![nausher](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nausher/32/49617_2.png) [@nausher](https://devforum.zoom.us/u/nausher)\
**Post date:** [June 22, 2023, 9:08am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/5 "2023-06-22T09:08:57Z")

</div>

@chunsiong.zoom  
Yes there is no proper documentation for this.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [June 22, 2023, 9:14am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/6 "2023-06-22T09:14:26Z")

</div>

Here’s the guide

> **[Meeting SDK Auth](https://developers.zoom.us/docs/meeting-sdk/auth/)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

---

<div class="post-metadata">

**Author:** ![purushottaminorbit26](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/purushottaminorbit26/32/49538_2.png) [@purushottaminorbit26](https://devforum.zoom.us/u/purushottaminorbit26)\
**Post date:** [June 22, 2023, 9:30am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/7 "2023-06-22T09:30:18Z")

</div>

@nausher if u solve this problem please share the code snippet … if i solve this i will share code snippet… this problem has not any proper solution on stackoverflow or chatgpt or internet… we need proper code snippet for this…

---

<div class="post-metadata">

**Author:** ![nausher](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nausher/32/49617_2.png) [@nausher](https://devforum.zoom.us/u/nausher)\
**Post date:** [June 22, 2023, 9:37am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/8 "2023-06-22T09:37:21Z")

</div>

Sure i’m trying to generate JWT code.

---

<div class="post-metadata">

**Author:** ![mehrshad](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mehrshad/32/49606_2.png) [@mehrshad](https://devforum.zoom.us/u/mehrshad)\
**Post date:** [June 22, 2023, 9:38am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/9 "2023-06-22T09:38:57Z")

</div>

This is the code to generate JTW in Typescript:

```auto
     const KJUR = require('jsrsasign')

      const iat = Math.round((new Date().getTime() - 30000) / 1000)
      const exp = iat + 60 * 60 * 2
      const oHeader = { alg: "HS256", typ: "JWT" }

      const oPayload = {
        sdkKey: process.env.ZOOM_SDK_KEY,
        mn: meetingNumber,
        role: role, // 0 or 1
        iat: iat,
        exp: exp,
        appKey: process.env.ZOOM_SDK_KEY,
        tokenExp: iat + 60 * 60 * 2,
      }

      const sHeader = JSON.stringify(oHeader)
      const sPayload = JSON.stringify(oPayload)
      const signature = KJUR.KJUR.jws.JWS.sign(
        "HS256",
        sHeader,
        sPayload,
        process.env.ZOOM_SDK_SECRET,
      )

```

Link: [Meeting SDK Auth](https://developers.zoom.us/docs/meeting-sdk/auth/#sample-code)

---

<div class="post-metadata">

**Author:** ![nausher](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nausher/32/49617_2.png) [@nausher](https://devforum.zoom.us/u/nausher)\
**Post date:** [June 22, 2023, 9:45am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/10 "2023-06-22T09:45:54Z")

</div>

But i’m finding in IOS Swift Language.

---

<div class="post-metadata">

**Author:** ![purushottaminorbit26](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/purushottaminorbit26/32/49538_2.png) [@purushottaminorbit26](https://devforum.zoom.us/u/purushottaminorbit26)\
**Post date:** [June 22, 2023, 9:47am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/11 "2023-06-22T09:47:51Z")

</div>

please share code snippet for swift iOS

---

<div class="post-metadata">

**Author:** ![mehrshad](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mehrshad/32/49606_2.png) [@mehrshad](https://devforum.zoom.us/u/mehrshad)\
**Post date:** [June 22, 2023, 9:49am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/12 "2023-06-22T09:49:10Z")

</div>

Sorry, I generate that on the BE to be shared among all platforms. I’ll see if I get time to do that in Swift and post it here later on.

---

<div class="post-metadata">

**Author:** ![purushottaminorbit26](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/purushottaminorbit26/32/49538_2.png) [@purushottaminorbit26](https://devforum.zoom.us/u/purushottaminorbit26)\
**Post date:** [June 22, 2023, 9:52am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/13 "2023-06-22T09:52:32Z")

</div>

import Foundation

func generateJWT(meetingNumber: String, role: Int) → String {  
let iat = Int(Date().timeIntervalSince1970) - 30000  
let exp = iat + 60 \* 60 \* 2  
let header = [“alg”: “HS256”, “typ”: “JWT”]  
let payload = [“sdkKey”: “ZOOM\_SDK\_KEY”, “mn”: meetingNumber, “role”: role, “iat”: iat, “exp”: exp, “appKey”: “ZOOM\_SDK\_KEY”, “tokenExp”: iat + 60 \* 60 \* 2]  
let headerString = JSONEncoder().encode(header).base64EncodedString()  
let payloadString = JSONEncoder().encode(payload).base64EncodedString()  
let signature = HMACSHA256.hash(data: headerString + “.”, key: “ZOOM\_SDK\_SECRET”).base64EncodedString()  
return headerString + “.” + payloadString + “.” + signature  
}

let jwt = generateJWT(meetingNumber: “123456”, role: 1)  
print(jwt)

This code will generate a JWT token that can be used to authenticate with Zoom. The `generateJWT()` function takes two arguments: the meeting number and the role. The role can be either 0 or 1, where 0 is a viewer and 1 is a host. The function returns a string that contains the JWT token.

To run this code, you will need to import the `Foundation` framework. You can do this by adding the following line to your project’s `Podfile`:

---

<div class="post-metadata">

**Author:** ![nausher](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nausher/32/49617_2.png) [@nausher](https://devforum.zoom.us/u/nausher)\
**Post date:** [June 22, 2023, 10:21am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/14 "2023-06-22T10:21:48Z")

</div>

> [@purushottaminorbit26](#):
>
> func generateJWT(meetingNumber: String, role: Int) → String {  
> let iat = Int(Date().timeIntervalSince1970) - 30000  
> let exp = iat + 60 \* 60 \* 2  
> let header = [“alg”: “HS256”, “typ”: “JWT”]  
> let payload = [“sdkKey”: “ZOOM\_SDK\_KEY”, “mn”: meetingNumber, “role”: role, “iat”: iat, “exp”: exp, “appKey”: “ZOOM\_SDK\_KEY”, “tokenExp”: iat + 60 \* 60 \* 2]  
> let headerString = JSONEncoder().encode(header).base64EncodedString()  
> let payloadString = JSONEncoder().encode(payload).base64EncodedString()  
> let signature = HMACSHA256.hash(data: headerString + “.”, key: “ZOOM\_SDK\_SECRET”).base64EncodedString()  
> return headerString + “.” + payloadString + “.” + signature  
> }

@purushottaminorbit26  
This is working for you?

---

<div class="post-metadata">

**Author:** ![purushottaminorbit26](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/purushottaminorbit26/32/49538_2.png) [@purushottaminorbit26](https://devforum.zoom.us/u/purushottaminorbit26)\
**Post date:** [June 22, 2023, 10:24am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/15 "2023-06-22T10:24:18Z")

</div>

i just convert the @mehrshad javascript code into swift …

---

<div class="post-metadata">

**Author:** ![mehrshad](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mehrshad/32/49606_2.png) [@mehrshad](https://devforum.zoom.us/u/mehrshad)\
**Post date:** [June 22, 2023, 10:36am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/16 "2023-06-22T10:36:19Z")

</div>

Great, thanks. I will also try it out

---

<div class="post-metadata">

**Author:** ![nausher](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nausher/32/49617_2.png) [@nausher](https://devforum.zoom.us/u/nausher)\
**Post date:** [June 22, 2023, 10:40am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/17 "2023-06-22T10:40:50Z")

</div>

> [@purushottaminorbit26](#):
>
> func generateJWT(meetingNumber: String, role: Int) → String {

@mehrshad Please let us know if this will work on your side.

---

<div class="post-metadata">

**Author:** ![nausher](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nausher/32/49617_2.png) [@nausher](https://devforum.zoom.us/u/nausher)\
**Post date:** [June 22, 2023, 12:33pm UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/18 "2023-06-22T12:33:32Z")

</div>

@chunsiong.zoom @purushottaminorbit26@mehrshad

let secret = sdkSecret  
let privateKey = SymmetricKey(data: Data(secret.utf8))  
let headerJSONData = try! JSONEncoder().encode(Header())  
let headerBase64String = headerJSONData.urlSafeBase64EncodedString()

```
    let payloadJSONData = try! JSONEncoder().encode(Payload())
    let payloadBase64String = payloadJSONData.urlSafeBase64EncodedString()

    let toSign = Data((headerBase64String + "." + payloadBase64String).utf8)

    let signature = HMAC<SHA256>.authenticationCode(for: toSign, using: privateKey)
    let signatureBase64String = Data(signature).urlSafeBase64EncodedString()

    let token = [headerBase64String, payloadBase64String, signatureBase64String].joined(separator: ".")

```

Generating Token By this way but its says invalid signature when i’m verifying it on [https://jwt.io/](https://jwt.io/)

---

<div class="post-metadata">

**Author:** ![purushottaminorbit26](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/purushottaminorbit26/32/49538_2.png) [@purushottaminorbit26](https://devforum.zoom.us/u/purushottaminorbit26)\
**Post date:** [June 24, 2023, 8:32am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/19 "2023-06-24T08:32:28Z")

</div>

@nausher @chunsiong.zoom @mehrshad  
I successfully generated JWT using zoom meeting sdk credentials and successfull initialize zoom sdk this morning and created a blog for solution to get access others also who are outside of this developer forum.  
please check this blog for detail step by step guide - [https://ioscruncher.blogspot.com/2023/06/solving-zoom-meeting-sdk-upgrade-issue.html](https://ioscruncher.blogspot.com/2023/06/solving-zoom-meeting-sdk-upgrade-issue.html)

by next week, i will also upload the server to server auth app use case in get access token and generate zoom user id and create meeting as hoast or join meeting - so you can integrate it for your app.

---

<div class="post-metadata">

**Author:** ![mehrshad](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mehrshad/32/49606_2.png) [@mehrshad](https://devforum.zoom.us/u/mehrshad)\
**Post date:** [June 25, 2023, 9:04am UTC](https://devforum.zoom.us/t/meeting-sdk-upgrade-issue/90596/20 "2023-06-25T09:04:14Z")

</div>

Thanks @purushottaminorbit26 for informing us and for the article. I’ve read your article but I didn’t see you set the token for the SDK in your code, also didn’t see you use SDK authentication service to call sdkAuth() to verify the SDK token. May you please share how you did that?

Also, role and meeting number are not used in JWT creation.
