# Invalid SDK KEY on Zoom Javascript SDK

**URL:** <https://devforum.zoom.us/t/invalid-sdk-key-on-zoom-javascript-sdk/124184>\
**Category:** Web\
**Created:** [January 8, 2025, 11:25pm UTC](https://devforum.zoom.us/t/invalid-sdk-key-on-zoom-javascript-sdk/124184 "2025-01-08T23:25:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![virtualevents](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/virtualevents/32/66218_2.png) [@virtualevents](https://devforum.zoom.us/u/virtualevents)\
**Post date:** [January 8, 2025, 11:25pm UTC](https://devforum.zoom.us/t/invalid-sdk-key-on-zoom-javascript-sdk/124184/1 "2025-01-08T23:25:45Z")

</div>

Hello please am having an issue with my code  
create\_meetin.php (page)

\<?php // Include the Firebase JWT PHP library require\_once 'vendor/autoload.php'; // Make sure to adjust the path to your autoload file use \Firebase\JWT\JWT; // Replace with your Zoom Server-to-Server OAuth credentials define('CLIENT\_ID', 'xxxxxxxx'); // Your Zoom Server-to-Server OAuth Client ID define('CLIENT\_SECRET', 'xxxxxxx'); // Your Zoom Server-to-Server OAuth Client Secret define('ZOOM\_EMAIL','virtualevents@myemail.com'); // Function to generate Server-to-Server OAuth access token function getAccessToken() { $url = 'https://zoom.us/oauth/token'; $payload = ['grant\_type' =\> 'account\_credentials', 'account\_id' =\> '\_QvcWxBfS7C6YNb4hX9HLA', // Replace with your actual account ID]; $headers = ['Authorization: Basic ' . base64\_encode(CLIENT\_ID . ':' . CLIENT\_SECRET), 'Content-Type: application/x-www-form-urlencoded',]; $ch = curl\_init(); curl\_setopt($ch, CURLOPT\_URL, $url); curl\_setopt($ch, CURLOPT\_POST, true); curl\_setopt($ch, CURLOPT\_RETURNTRANSFER, true); curl\_setopt($ch, CURLOPT\_POSTFIELDS, http\_build\_query($payload)); curl\_setopt($ch, CURLOPT\_HTTPHEADER, $headers); curl\_setopt($ch, CURLOPT\_SSL\_VERIFYPEER, false); curl\_setopt($ch, CURLOPT\_SSL\_VERIFYHOST, false); $response = curl\_exec($ch); if (curl\_errno($ch)) { throw new Exception('cURL Error: ' . curl\_error($ch)); } curl\_close($ch); $decodedResponse = json\_decode($response, true); if (!isset($decodedResponse['access\_token'])) { throw new Exception('Failed to generate access token: ' . $response); } return $decodedResponse['access\_token']; } // Function to create a Zoom meeting function createZoomMeeting($topic, $start\_time, $duration, $access\_token) { $url = 'https://api.zoom.us/v2/users/' . ZOOM\_EMAIL . '/meetings'; $headers = ['Authorization: Bearer ' . $access\_token, 'Content-Type: application/json']; $postFields = json\_encode(['topic' =\> $topic, 'type' =\> 2, // Scheduled meeting 'start\_time' =\> $start\_time, 'duration' =\> $duration, 'settings' =\> [ 'host\_video' =\> true, 'participant\_video' =\> true, 'join\_before\_host' =\> false, 'mute\_upon\_entry' =\> true, 'audio' =\> 'both', 'auto\_recording' =\> 'cloud'] ]); $ch = curl\_init($url); curl\_setopt($ch, CURLOPT\_RETURNTRANSFER, true); curl\_setopt($ch, CURLOPT\_POST, 1); curl\_setopt($ch, CURLOPT\_POSTFIELDS, $postFields); curl\_setopt($ch, CURLOPT\_HTTPHEADER, $headers); curl\_setopt($ch, CURLOPT\_SSL\_VERIFYPEER, false); curl\_setopt($ch, CURLOPT\_SSL\_VERIFYHOST, false); $response = curl\_exec($ch); if (curl\_errno($ch)) { throw new Exception('cURL Error: ' . curl\_error($ch)); } curl\_close($ch); return json\_decode($response, true); } // Function to generate SDK Signature using JWT function generateSDKSignature($sdkKey, $sdkSecret, $meetingNumber, $role) { $iat = time(); $exp = $iat + 60; // Signature valid for 60 seconds $payload = ['sdkKey' =\> $sdkKey, 'mn' =\> $meetingNumber, 'role' =\> $role, 'iat' =\> $iat, 'exp' =\> $exp, 'appKey' =\> $sdkKey, 'tokenExp' =\> $iat + 3600 // Token expiration]; // Encode the payload and generate the JWT token $jwt = JWT::encode($payload, $sdkSecret, 'HS256'); // Add 'HS256' as the algorithm return $jwt; } // Main Script if ($\_SERVER['REQUEST\_METHOD'] === 'POST') { $topic = $\_POST['topic']; $start\_time = $\_POST['start\_time']; // ISO 8601 format $duration = $\_POST['duration']; // Duration in minutes $role = 1; // 1 for host, 0 for participant try { // Step 1: Get Access Token $access\_token = getAccessToken(); // Step 2: Create Zoom Meeting $meeting = createZoomMeeting($topic, $start\_time, $duration, $access\_token); if (isset($meeting['code'])) { throw new Exception("Error Creating Meeting: " . $meeting['message']); } // Step 3: Generate SDK Signature using JWT $sdkKey = CLIENT\_ID; // Use Client ID as SDK Key $sdkSecret = CLIENT\_SECRET; // Use Client Secret as SDK Secret $meetingNumber = $meeting['id']; $sdkSignature = generateSDKSignature($sdkKey, $sdkSecret, $meetingNumber, 0); // Return Response echo json\_encode(['meeting' =\> $meeting, 'sdkSignature' =\> $sdkSignature,]); } catch (Exception $e) { echo json\_encode(['error' =\> $e-\>getMessage()]); } } else { echo ' Topic:  
  
  
 Start Time (ISO 8601, e.g., "2025-01-08T10:00:00Z"):  
  
  
 Duration (minutes):  
  
  
 Create Meeting '; } ?\>

the meeting details is created success but i have issue joining the meeting

Response  
{“meeting”:{“[uuid":“hWPlGoEvS4ytEkdSTNCWUQ==”,“id”:82366919918,“host\_id”:“yz29o\_yKT5mVFGuK1Wa5PQ”,“host\_email”:"virtualevents@projkonnect.com](mailto:uuid%22:%22hWPlGoEvS4ytEkdSTNCWUQ==%22,%22id%22:82366919918,%22host_id%22:%22yz29o_yKT5mVFGuK1Wa5PQ%22,%22host_email%22:%22virtualevents@projkonnect.com)”,“topic”:“Project Konnect Topics specials”,“type”:2,“status”:“waiting”,“start\_time”:“2025-01-08T23:01:53Z”,“duration”:60,“timezone”:“America/New\_York”,“created\_at”:“2025-01-08T23:01:53Z”,“start\_url”:“https://us06web.zoom.us/s/9700709395?zak=eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInptX3NrbSI6InptX28ybSIsImFsZyI6IkhTMjU2In0.eyJpc3MiOiJ3ZWIiLCJjbHQiOjAsIm1udW0iOiI5NzAwNzA5Mzk1IiwiYXVkIjoiY2xpZW50c20iLCJ1aWQiOiJ5ejI5b195S1Q1bVZGR3VLMVdhNVBRIiwiemlkIjoiMzA4YjA1MWViM2JhNDg4NTk0OTEwZWMzMzUyZGRmOWQiLCJzayI6IjYyNzYxMDUzMzgxNzUxMTE5NjkiLCJzdHkiOjEwMCwid2NkIjoidXMwNiIsImV4cCI6MTczNjM4NDUxMywiaWF0IjoxNzM2Mzc3MzEzLCJhaWQiOiJfUXZjV3hCZlM3QzZZTmI0aFg5SExBIiwiY2lkIjoiIn0.eRkad\_WznRjRCw-0hq1A4CCm9C4t6Sp1Yg1jdb7hVQQ”,“join\_url”:“https://us06web.zoom.us/j/9700709395?pwd=bzF6NFVUdC9pREhJRXA4bjhhTXh4dz09&omn=82366919918”,“password”:“rdE5x1”,“h323\_password”:“176768”,“pstn\_password”:“176768”,“encrypted\_password”:“bzF6NFVUdC9pREhJRXA4bjhhTXh4dz09”,“pmi”:“9700709395”,“settings”:{“host\_video”:true,“participant\_video”:true,“cn\_meeting”:false,“in\_meeting”:false,“join\_before\_host”:false,“jbh\_time”:0,“mute\_upon\_entry”:true,“watermark”:false,“use\_pmi”:true,“approval\_type”:2,“audio”:“both”,“auto\_recording”:“cloud”,“enforce\_login”:true,“enforce\_login\_domains”:“”,“alternative\_hosts”:“”,“alternative\_host\_update\_polls”:false,“close\_registration”:false,“show\_share\_button”:false,“allow\_multiple\_devices”:false,“registrants\_confirmation\_email”:true,“waiting\_room”:false,“request\_permission\_to\_unmute\_participants”:false,“global\_dial\_in\_countries”:[“US”],“global\_dial\_in\_numbers”:[{“country\_name”:“US”,“number”:“+1 564 217 2000”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“number”:“+1 646 931 3860”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“number”:“+1 669 444 9171”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“city”:“San Jose”,“number”:“+1 669 900 6833”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“number”:“+1 689 278 1000”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“number”:“+1 719 359 4580”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“city”:“New York”,“number”:“+1 929 436 2866”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“number”:“+1 253 205 0468”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“city”:“Tacoma”,“number”:“+1 253 215 8782”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“city”:“Washington DC”,“number”:“+1 301 715 8592”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“number”:“+1 305 224 1968”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“number”:“+1 309 205 3325”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“city”:“Chicago”,“number”:“+1 312 626 6799”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“city”:“Houston”,“number”:“+1 346 248 7799”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“number”:“+1 360 209 5623”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“number”:“+1 386 347 5053”,“type”:“toll”,“country”:“US”},{“country\_name”:“US”,“number”:“+1 507 473 4847”,“type”:“toll”,“country”:“US”}],“registrants\_email\_notification”:true,“meeting\_authentication”:true,“authentication\_option”:“signIn\_\_QvcWxBfS7C6YNb4hX9HLA”,“authentication\_name”:“Sign in to Zoom”,“authentication\_domains”:“”,“encryption\_type”:“enhanced\_encryption”,“approved\_or\_denied\_countries\_or\_regions”:{“enable”:false},“breakout\_room”:{“enable”:false},“internal\_meeting”:false,“continuous\_meeting\_chat”:{“enable”:false,“auto\_add\_invited\_external\_users”:false,“auto\_add\_meeting\_participants”:false},“participant\_focused\_meeting”:false,“push\_change\_to\_calendar”:false,“resources”:,“auto\_start\_meeting\_summary”:false,“auto\_start\_ai\_companion\_questions”:false,“allow\_host\_control\_participant\_mute\_state”:false,“alternative\_hosts\_email\_notification”:true,“show\_join\_info”:false,“device\_testing”:false,“focus\_mode”:false,“meeting\_invitees”:,“private\_meeting”:false,“email\_notification”:true,“host\_save\_video\_order”:false,“sign\_language\_interpretation”:{“enable”:false},“email\_in\_attendee\_report”:false},“supportGoLive”:false,“creation\_source”:“open\_api”,“pre\_schedule”:false},“sdkSignature”:“eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZGtLZXkiOiJIaUlrMDNORlNYeTYwbmRYTTFoaVEiLCJtbiI6ODIzNjY5MTk5MTgsInJvbGUiOjAsImlhdCI6MTczNjM3NzMxMiwiZXhwIjoxNzM2Mzc3MzcyLCJhcHBLZXkiOiJIaUlrMDNORlNYeTYwbmRYTTFoaVEiLCJ0b2tlbkV4cCI6MTczNjM4MDkxMn0.t3A653BeL5wk1y-Uz13PwwTJjAwEMs0NJc3QcsMr89U”}

Now Joining the meeting  
(Javascript)  
ZoomMtg.preLoadWasm()  
ZoomMtg.prepareWebSDK()

var signature=“eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInptX3NrbSI6InptX28ybSIsImFsZyI6IkhTMjU2In0.eyJpc3MiOiJ3ZWIiLCJjbHQiOjAsIm1udW0iOiI5NzAwNzA5Mzk1IiwiYXVkIjoiY2xpZW50c20iLCJ1aWQiOiJ5ejI5b195S1Q1bVZGR3VLMVdhNVBRIiwiemlkIjoiMzA4YjA1MWViM2JhNDg4NTk0OTEwZWMzMzUyZGRmOWQiLCJzayI6IjYyNzYxMDUzMzgxNzUxMTE5NjkiLCJzdHkiOjEwMCwid2NkIjoidXMwNiIsImV4cCI6MTczNjM4NDUxMywiaWF0IjoxNzM2Mzc3MzEzLCJhaWQiOiJfUXZjV3hCZlM3QzZZTmI0aFg5SExBIiwiY2lkIjoiIn0.eRkad\_WznRjRCw-0hq1A4CCm9C4t6Sp1Yg1jdb7hVQQ”  
var sdkKey = “xxxxxxxx”  
var meetingNumber = ‘84978319461’ // The meeting number returned from the Zoom API  
var passWord = ‘xxx’ // Ensure this is correctly passed from your meeting creation response  
var role = 0  
var userName = ‘JavaScript’  
var userEmail = ‘virtualevents@projkonnect.com’  
var registrantToken = ‘’  
var leaveUrl = ‘[https://zoom.us](https://zoom.us)’  
var zakToken = ‘’

function startMeeting() {  
document.getElementById(‘zmmtg-root’).style.display = ‘block’

ZoomMtg.init({  
leaveUrl: leaveUrl,  
patchJsMedia: true,  
leaveOnPageUnload: true,  
success: (success) =\> {  
console.log(success)  
ZoomMtg.join({  
signature: signature,  
sdkKey: sdkKey, // Ensure this is the correct SDK Key  
meetingNumber: meetingNumber,  
passWord: passWord,  
userName: userName,  
userEmail: userEmail,  
//tk: registrantToken,  
zak: zakToken,  
success: (success) =\> {  
console.log(success)  
},  
error: (error) =\> {  
console.log(error)  
},  
})  
},  
})  
}

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [January 9, 2025, 3:12pm UTC](https://devforum.zoom.us/t/invalid-sdk-key-on-zoom-javascript-sdk/124184/2 "2025-01-09T15:12:37Z")

</div>

Thank you for posting in the Zoom Developer Forum. Can you provide more details about the behavior you are seeing and what you already tired to resolve it ?

Also, this post seems related and may help:

> [@Failed to join meeting error code 3712](https://devforum.zoom.us/t/failed-to-join-meeting-error-code-3712/124197/3):
>
> @vitieubao83 , Thank you for posting in the Zoom Developer Forum. We actually have Youtube video you can reference for debugging your signature. Here is the link: [[Decoding JWT for Authorization Errors for Zoom Meeting SDK] ](https://www.youtube.com/watch?v=F3l5RJoEKP4) Take a look and let us know if you still are encounter an issue.

---

<div class="post-metadata">

**Author:** ![virtualevents](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/virtualevents/32/66218_2.png) [@virtualevents](https://devforum.zoom.us/u/virtualevents)\
**Post date:** [January 11, 2025, 8:52am UTC](https://devforum.zoom.us/t/invalid-sdk-key-on-zoom-javascript-sdk/124184/3 "2025-01-11T08:52:26Z")

</div>

Hello Thanks for your response am using Server to Server Authentication and after i generated the signature i wanted to start the meeting using the JS SDK i keep getting Invalid SDK in my broswer console key even when i generated one on the zoom developer sdk page using my client id and client secret ID and the meeting ID too.

i dont know if there is anything more i need to do regarding this ?

---

<div class="post-metadata">

**Author:** ![virtualevents](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/virtualevents/32/66218_2.png) [@virtualevents](https://devforum.zoom.us/u/virtualevents)\
**Post date:** [January 11, 2025, 8:54am UTC](https://devforum.zoom.us/t/invalid-sdk-key-on-zoom-javascript-sdk/124184/4 "2025-01-11T08:54:21Z")

</div>

I saw something regarding Zoom ISV partnership that i can embed zoom features into my application unless am a partner i don’t know how true this is i have watch the video and followed every step directly and still same issues please i will be waiting for your reponse

---

<div class="post-metadata">

**Author:** ![virtualevents](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/virtualevents/32/66218_2.png) [@virtualevents](https://devforum.zoom.us/u/virtualevents)\
**Post date:** [January 15, 2025, 1:40pm UTC](https://devforum.zoom.us/t/invalid-sdk-key-on-zoom-javascript-sdk/124184/5 "2025-01-15T13:40:01Z")

</div>

Hello greeting to your please any feedback on my case ?? the solution you recommended tried it already many times and it does not work

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [January 24, 2025, 2:07am UTC](https://devforum.zoom.us/t/invalid-sdk-key-on-zoom-javascript-sdk/124184/6 "2025-01-24T02:07:20Z")

</div>

@virtualevents ,

Apologies for the delay—I was under the weather. I notice you’ve created a Server-to-Server Authentication, but I recommend creating a general app instead. Have you explored our sample apps? We offer both a sample authentication app and a JavaScript Zoom Meeting SDK app. These apps demonstrate the entire flow with proper separation of concerns, which makes troubleshooting JWT issues much easier.

> **[GitHub - zoom/meetingsdk-auth-endpoint-sample: Generate a Meeting SDK JWT to join Zoom meetings...](https://github.com/zoom/meetingsdk-auth-endpoint-sample)**
>
> Generate a Meeting SDK JWT to join Zoom meetings and webinars with the Meeting SDK.

You can input your SDK credentials and add the token manually, which helps isolate whether the issue lies in your token generation process.

> **[GitHub - zoom/meetingsdk-javascript-sample: Use the Zoom Meeting SDK in (vanilla) JavaScript](https://github.com/zoom/meetingsdk-javascript-sample)**
>
> Use the Zoom Meeting SDK in (vanilla) JavaScript

Here’s the sample meeting app where you can verify if your generated token works. If the token functions in this sample app, it should work in your application as well.

---

<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:** [February 23, 2025, 12:07pm UTC](https://devforum.zoom.us/t/invalid-sdk-key-on-zoom-javascript-sdk/124184/7 "2025-02-23T12:07:46Z")

</div>

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