{method: 'join', status: false, result: null, errorMessage: 'Sdk key length error, must 36', errorCode: 4003}

import React, {useEffect} from “react”;

declare var ZoomMtg;a

ZoomMtg.setZoomJSLib(“https://source.zoom.us/2.6.0/lib”, “/av”);

ZoomMtg.preLoadWasm();
ZoomMtg.prepareWebSDK();

ZoomMtg.i18n.load(‘en-US’);
ZoomMtg.i18n.reload(‘en-US’);

function ZoomMSDK() {
// Get Zoom MSDK KEY, Signature endpoint, and leave URL environment variables
const {
REACT_APP_ZOOM_MSDK_KEY = “”,
REACT_APP_MSDK_SIGNATURE_ENDPOINT = “”,
LEAVE_URL = “http://localhost:3000”,
} = process.env;

// Get the meeting number and password from the URL parameters
const queryParams = new URLSearchParams(window.location.search);
const mn = queryParams.get(“mn”);
const pw = queryParams.get(“pw”);

// Assign meeting role based on user type
const role = “1”; // 1 for host, 0 for attendee

const getSignature = (e) => {

if (e) e.preventDefault();


const SIGNATURE_OPTIONS = {
  method: "POST",
  headers: { "Content-Type": "application/json"},
  body: JSON.stringify({
    meetingNumber: mn,
    role:  parseInt(role, 10),
  }),
};

fetch(REACT_APP_MSDK_SIGNATURE_ENDPOINT, SIGNATURE_OPTIONS)
  .then((data) => data.json())
  .then(({ signature }) => !!signature && startMeeting(signature));

};

const startMeeting = (signature) => {
document.getElementById(“zmmtg-root”).style.display = “block”;

ZoomMtg.init({
leaveUrl: LEAVE_URL,

  success: (success) => {
    console.log(success)

    ZoomMtg.join({
      signature: signature,
      meetingNumber: mn,
      sdkKey: REACT_APP_ZOOM_MSDK_KEY,
      userName: "firas ghobber",
      passWord: pw,
   //   tk:'',
      success: (success) => {
        console.log(success)
      },
      error: (error) => {
        console.log(error)
      }
    })
  },
  error: (error) => {
    console.log(error)
  }
})

}

useEffect(() => {
const mn = queryParams.get(“mn”);
const pw = queryParams.get(“pw”);
console.log(mn, pw)

if (mn && pw) getSignature();

});

return (

zoomMSDK

)
}

export default ZoomMSDK

do you use 2.6.0 with a new created Meeting SDK (without SDK credentials?)

  • SDK Key is 36 char long (apps created before Feb 11, 2023)
  • Client ID is 20 char long

if yes - this is not possible, you have to upgrade to 2.10.1 or newer

think you for response me, i have upgrade to 2.10.1 but still the same error but other error indicate to line 9 is “ZoomMtg.prepareWebSDK();”.

you have a mixed installation 2.6.0 with libraries 2.10.1 → result: error 403 forbidden

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