# Invalid SDKKey error(errorCode : 1)

**URL:** <https://devforum.zoom.us/t/invalid-sdkkey-error-errorcode-1/99232>\
**Category:** Web\
**Created:** [November 29, 2023, 10:25am UTC](https://devforum.zoom.us/t/invalid-sdkkey-error-errorcode-1/99232 "2023-11-29T10:25:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dacv696](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dacv696/32/54371_2.png) [@dacv696](https://devforum.zoom.us/u/dacv696)\
**Post date:** [November 29, 2023, 10:25am UTC](https://devforum.zoom.us/t/invalid-sdkkey-error-errorcode-1/99232/1 "2023-11-29T10:25:01Z")

</div>

I am facing an issue while testing the Zoom Meeting SDK for the web. Specifically, I am encountering an “Invalid sdkKey” error, and I am reaching out to seek your assistance in resolving this matter.

Here is a snippet of the code I am using to generate the SDK JWT on the server side:

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

let key="xxx"
let secret="xxx"

const oPayload = {
  sdkKey: key,
  appKey: key,
  mn: req.body?.meetingNumber,
  role: req.body?.role,
  iat: iat,
  exp: exp,
  tokenExp: exp
}

const sHeader = JSON.stringify(oHeader)
const sPayload = JSON.stringify(oPayload)
const sdkJWT = KJUR.jws.JWS.sign('HS256', sHeader, sPayload, secret)

```

And on the client side, I am using the following code:

```javascript
ZoomMtg.init({
  leaveUrl: leaveUrl,
  isSupportAV: true,
  success: (success) => {
    ZoomMtg.join({
      sdkKey: sdkKey,
      signature: signature, // Pass in your Meeting SDK JWT
      meetingNumber: meetingNumber,
      passWord: passWord,
      userName: "Test",
      success: (success) => {
        console.log(success)
      },
      error: (error) => {
        console.log(error)
      }
    })
  },
  error: (error) => {
    console.log(error)
  }
})

```

I have double-checked the sdkKey and secret, but the error persists. Any insights or guidance on how to resolve this issue would be greatly appreciated.

Thank you for your time and assistance.

---

<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:** [December 6, 2023, 4:31pm UTC](https://devforum.zoom.us/t/invalid-sdkkey-error-errorcode-1/99232/2 "2023-12-06T16:31:17Z")

</div>

Hi @dacv696  
Sorry for the late reply here!  
Are you still encountering this issue or were you able to troubleshoot this on your end?  
Cheers,  
Elisa

---

<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:** [January 6, 2024, 2:31am UTC](https://devforum.zoom.us/t/invalid-sdkkey-error-errorcode-1/99232/3 "2024-01-06T02:31:45Z")

</div>

Closed on January 6, 2024, 2:31am UTC

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