cancel
Showing results for 
Search instead for 
Did you mean: 
The Zoom Community will be placed in read-only mode January 9th, 2026 through January 22nd, 2026 to deliver you a new and improved community experience!

The community will still be accessible, however, the creation of any new discussions or replies will be temporarily unavailable. We appreciate your patience during this time.

Zoom Meeting is Not Getting Launch

SaurabhJ
Newcomer
Newcomer

 

I am using Zoom SDK, Version - 5.16.10 and i am not able to launch the zoom meeting i am not getting success after passing the JWT token.

As the token which i am getting i am verifying it on https://jwt.io/ website also but it is giving Invalid Signature but after doing changes on my JWT token got verified also then i pass that token in my SDK also but still i am getting 

"tokenWrong" error. As i have tried multiple times but not got success also my client key and secret key is also correct as i have verified it also. So problem is that after passing correct token also i am not getting success . Please help me!!!

1 REPLY 1

SaurabhJ
Newcomer
Newcomer

Here is the  function which i am using to make JWT token is given below :- 

func generateSignature(key: String, secret: String, meetingNumber: Int, role: Int) -> String? {

        let iAT = Int(Date().timeIntervalSince1970)

        let exp = iAT + 60 * 60 * 2

        let header = ["alg": "HS256", "typ": "JWT"]

        let payload =

        [

            "appKey": "\(key)",

            "iat": "\(iat)",

            "exp": "\(exp)",

            "tokenExp": "\(exp)",

            "userName": "John Doe"

        ]

        guard let headerData = try? JSONSerialization.data(withJSONObject: header,

                                                           options: [.prettyPrinted]) else {

            return nil

        }

        guard let payloadData = try? JSONSerialization.data(withJSONObject: payload,

                                                            options: [.prettyPrinted]) else {

            return nil

        }

        

        let base64UrlEncodedHeader = headerData.base64EncodedString()

            .replacingOccurrences(of: "+", with: "-")

            .replacingOccurrences(of: "/", with: "_")

            .replacingOccurrences(of: "=", with: "")

        let base64UrlEncodedPayload = payloadData.base64EncodedString()

            .replacingOccurrences(of: "+", with: "-")

            .replacingOccurrences(of: "/", with: "_")

            .replacingOccurrences(of: "=", with: "")

        let signatureData = HMAC<SHA256>.authenticationCode(for: (base64UrlEncodedHeader + "." + base64UrlEncodedPayload).data(using: .utf8)!, using: SymmetricKey(data: secret.data(using: .utf8)!))

        let base64UrlEncodedSignature = Data(signatureData).base64EncodedString()

            .replacingOccurrences(of: "+", with: "-")

            .replacingOccurrences(of: "/", with: "_")

            .replacingOccurrences(of: "=", with: "")

        let token = "\(base64UrlEncodedHeader).\(base64UrlEncodedPayload).\(base64UrlEncodedSignature)"

        return token

    }