# Getting Error as Invalid sdk key for join

**URL:** <https://devforum.zoom.us/t/getting-error-as-invalid-sdk-key-for-join/95504>\
**Category:** Meetings\
**Created:** [September 21, 2023, 7:56am UTC](https://devforum.zoom.us/t/getting-error-as-invalid-sdk-key-for-join/95504 "2023-09-21T07:56:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sneha.agashe](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sneha.agashe](https://devforum.zoom.us/u/sneha.agashe)\
**Post date:** [September 21, 2023, 7:56am UTC](https://devforum.zoom.us/t/getting-error-as-invalid-sdk-key-for-join/95504/1 "2023-09-21T07:56:26Z")

</div>

We are facing issue while joining the meeting. Always getting the same error as invalid sdkkey. Previously this code snippet was working as is, but since a couple of days we are continuously facing the issue while trying to connect to zoom via the below mentioned code snippet. Even if we download and add the code snippet from the source git it works for the html with same sdk and secret. but giving error when integrated inside application  
SDK Used: 2.11.5  
import { ZoomMtg } from “@zoomus/websdk”;  
import { KJUR } from “jsrsasign”;

console.log(“checkSystemRequirements”);  
console.log(JSON.stringify(ZoomMtg.checkSystemRequirements()));

// CDN version default  
ZoomMtg.setZoomJSLib(‘[https://source.zoom.us/2.11.5/lib](https://source.zoom.us/2.11.5/lib)’, ‘/av’);

ZoomMtg.preLoadWasm();

ZoomMtg.prepareJssdk();

export const zoomMixIn = {

```
methods: {

    GenerateSignature(sdkKey, sdkSecret, mn, role) {
        const iat = Math.round(new Date().getTime() / 1000) - 30;
        const exp = iat + 60 * 60 * 2

        const oHeader = { alg: 'HS256', typ: 'JWT' }
        const oPayload = {
            sdkKey: sdkKey,
            mn: mn,
            role: role,
            iat: iat,
            exp: exp,
            appKey: sdkSecret,
            tokenExp: iat + 60 * 60 * 2
        }

        const sHeader = JSON.stringify(oHeader)
        const sPayload = JSON.stringify(oPayload)
        const signature = KJUR.jws.JWS.sign('HS256', sHeader, sPayload, sdkSecret);

        console.log(signature);

        return signature;
    },

    setupZoomMeeting(config) {
        var vm = this;
        //var isHost = (config.role === 1);
        // join function
        // console.log(config);
        // **********************************************************************************************************************************
        ZoomMtg.init({
            leaveUrl: config.leaveUrl,
            isSupportAV: true,
            isSupportChat: false,
            screenShare: false,
            disablePreview: true,
            disableInvite: true,
            isLockBottom: true,
            success: (res) => {
                //-------------------------------
                console.log(res); debugger;
                //-------------------------------
                ZoomMtg.join({
                    sdkKey: config.sdkKey,
                    meetingNumber: config.meetingId,
                    userName: config.userName,
                    signature: this.GenerateSignature(config.sdkKey, config.sdkSecret, config.meetingId, config.role),
                    userEmail: "",
                    passWord: config.password,
                    success: function (res) {
                        console.log(res);},

```

error: function (res) {  
// eslint-disable-next-line  
console.log(res);  
}  
});  
},  
error: function (res) {  
// eslint-disable-next-line  
console.log(res);  
}  
});  
}  
},  
};

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [September 22, 2023, 3:07pm UTC](https://devforum.zoom.us/t/getting-error-as-invalid-sdk-key-for-join/95504/2 "2023-09-22T15:07:27Z")

</div>

Hi @sneha.agashe  
thanks for reaching out to us  
Are you still facing this issue?  
Can you please make sure that you are using a valid SDK key when running your application?
