# apiKey or sdkKey only need one, and can't empty ({\\"apiKey\\":\\"\\",\\"sdkKey\\":\\"\\"}

**URL:** <https://devforum.zoom.us/t/apikey-or-sdkkey-only-need-one-and-cant-empty-apikey-sdkkey/80364>\
**Category:** Meetings\
**Created:** [December 15, 2022, 6:05pm UTC](https://devforum.zoom.us/t/apikey-or-sdkkey-only-need-one-and-cant-empty-apikey-sdkkey/80364 "2022-12-15T18:05:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nirmaltiwari139](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nirmaltiwari139/32/43815_2.png) [@nirmaltiwari139](https://devforum.zoom.us/u/nirmaltiwari139)\
**Post date:** [December 15, 2022, 6:05pm UTC](https://devforum.zoom.us/t/apikey-or-sdkkey-only-need-one-and-cant-empty-apikey-sdkkey/80364/1 "2022-12-15T18:05:48Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/4/6/46d54927c42ea9455e6f76ce92004324d27fa55e.png)

{  
“method”: “join”,  
“status”: false,  
“result”: null,  
“errorMessage”: “apiKey or sdkKey only need one, and can’t empty ({"apiKey":"","sdkKey":""})”,  
“errorCode”: 4003  
}

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [December 15, 2022, 11:30pm UTC](https://devforum.zoom.us/t/apikey-or-sdkkey-only-need-one-and-cant-empty-apikey-sdkkey/80364/2 "2022-12-15T23:30:57Z")

</div>

Hi,

Just by looking at it seems that you may not be passing the correct credentials.  
Can you provide us with steps to reproduce the error?

Thanks

---

<div class="post-metadata">

**Author:** ![nirmaltiwari139](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nirmaltiwari139/32/43815_2.png) [@nirmaltiwari139](https://devforum.zoom.us/u/nirmaltiwari139)\
**Post date:** [December 16, 2022, 11:16am UTC](https://devforum.zoom.us/t/apikey-or-sdkkey-only-need-one-and-cant-empty-apikey-sdkkey/80364/3 "2022-12-16T11:16:13Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/8/b8fbec53c63e51fa3b6b25da64cfcc6aa3326f8e.png)

unable to join the meeting which has been created from host.

---

<div class="post-metadata">

**Author:** ![nirmaltiwari139](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nirmaltiwari139/32/43815_2.png) [@nirmaltiwari139](https://devforum.zoom.us/u/nirmaltiwari139)\
**Post date:** [December 16, 2022, 11:36am UTC](https://devforum.zoom.us/t/apikey-or-sdkkey-only-need-one-and-cant-empty-apikey-sdkkey/80364/4 "2022-12-16T11:36:24Z")

</div>

{  
“method”: “join”,  
“status”: false,  
“result”: “Invalid signature.”,  
“errorMessage”: “Signature is invalid.”,  
“errorCode”: 3712  
}

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [December 16, 2022, 6:35pm UTC](https://devforum.zoom.us/t/apikey-or-sdkkey-only-need-one-and-cant-empty-apikey-sdkkey/80364/5 "2022-12-16T18:35:07Z")

</div>

Hi @nirmaltiwari139 ,

It does seem that you are not generating the signature correctly. What app type are you using to generate the credentials? Can you make sure that you are following the guidelines mentioned here: [https://marketplace.zoom.us/docs/sdk/native-sdks/auth/#2-generate-the-meeting-sdk-jwt](https://marketplace.zoom.us/docs/sdk/native-sdks/auth/#2-generate-the-meeting-sdk-jwt) ?

If you continue to get the error, I would [decode](https://www.base64decode.org/) the signature. The output values should match the following:

```auto
  "appKey": SDK_KEY,
  "sdkKey": SDK_KEY,
  "mn": MEETING_NUMBER,
  "role": ROLE,
  "iat": 1646937553,
  "exp": 1646944753,
  "tokenExp": 1646944753

```

---

<div class="post-metadata">

**Author:** ![j.schoenemeyer](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@j.schoenemeyer](https://devforum.zoom.us/u/j.schoenemeyer)\
**Post date:** [December 16, 2022, 8:18pm UTC](https://devforum.zoom.us/t/apikey-or-sdkkey-only-need-one-and-cant-empty-apikey-sdkkey/80364/6 "2022-12-16T20:18:54Z")

</div>

perhaps you should start with the zoom example on github → CDN version

> **[GitHub - zoom/meetingsdk-web-sample: Zoom Meeting SDK Web Sample App](https://github.com/zoom/meetingsdk-web-sample)**
>
> Zoom Meeting SDK Web Sample App. Contribute to zoom/meetingsdk-web-sample development by creating an account on GitHub.

enter SDK\_KEY and SDK\_SECRET → CDN/js/index.js and start the meeting

> <https://github.com/zoom/meetingsdk-web-sample/blob/master/CDN/js/index.js>

now you have a reference version and you can compare it with your programming

---

<div class="post-metadata">

**Author:** ![nirmaltiwari139](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nirmaltiwari139/32/43815_2.png) [@nirmaltiwari139](https://devforum.zoom.us/u/nirmaltiwari139)\
**Post date:** [December 18, 2022, 1:20pm UTC](https://devforum.zoom.us/t/apikey-or-sdkkey-only-need-one-and-cant-empty-apikey-sdkkey/80364/7 "2022-12-18T13:20:01Z")

</div>

Iam using this function using [asp.net](http://asp.net) for generating signature.

public static string GenerateToken(string apiKey, string apiSecret, string meetingNumber, string ts, string role)  
{  
string message = String.Format(“{0}{1}{2}{3}”, apiKey, meetingNumber, ts, role);  
apiSecret = apiSecret ?? “”;  
var encoding = new System.Text.ASCIIEncoding();  
byte keyByte = encoding.GetBytes(apiSecret);  
byte messageBytesTest = encoding.GetBytes(message);  
string msgHashPreHmac = System.Convert.ToBase64String(messageBytesTest);  
byte messageBytes = encoding.GetBytes(msgHashPreHmac);  
using (var hmacsha256 = new HMACSHA256(keyByte))  
{  
byte hashmessage = hmacsha256.ComputeHash(messageBytes);  
string msgHash = System.Convert.ToBase64String(hashmessage);  
string token = String.Format(“{0}.{1}.{2}.{3}.{4}”, apiKey, meetingNumber, ts, role, msgHash);  
var tokenBytes = System.Text.Encoding.UTF8.GetBytes(token);  
return System.Convert.ToBase64String(tokenBytes).TrimEnd(padding);  
}  
}

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [December 19, 2022, 4:52pm UTC](https://devforum.zoom.us/t/apikey-or-sdkkey-only-need-one-and-cant-empty-apikey-sdkkey/80364/8 "2022-12-19T16:52:32Z")

</div>

please refer to [Generate SDK Signature with ASP.NET Core (C#) backend - #8 by donte.zoom](https://devforum.zoom.us/t/generate-sdk-signature-with-asp-net-core-c-backend/78401/8?). I will close this one for duplicacy

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [December 19, 2022, 4:52pm UTC](https://devforum.zoom.us/t/apikey-or-sdkkey-only-need-one-and-cant-empty-apikey-sdkkey/80364/9 "2022-12-19T16:52:41Z")

</div>

Closed on December 19, 2022, 4:52pm UTC


