Meeting SDK Failed to join meeting (Error Code: 4003 Invalid Parameter)

Hi,

I had actually integrated the Meeting SDK with my Angular application. I followed the code from this link: GitHub - zoom/meetingsdk-angular-sample: Use the Zoom Meeting SDK in Angular, which states that it is required to set up the authEndpoint. Therefore, I set up the authEndpoint using Express and NodeJs. However, whenever I tried to join the meeting, it pop up ‘Fail to join the meeting’. Kindly appreciate any assistance on what parameter is missing or invalid.

Browser console error:
{type: ‘JOIN_MEETING_FAILED’, reason: ‘Invalid Parameter’, errorCode: 4003}

Code Snippets Angular:
getSignature() {
this.httpClient.post(this.authEndpoint, {
meetingNumber: this.meetingNumber,
role: this.role
}).toPromise().then((data: any) => {
if (data.signature) {
console.log(data.signature);
this.startMeeting(data.signature);
} else {
console.log(data);
}
}).catch((error) => {
console.log(error);
});
}

startMeeting(signature) {
this.client.join({
signature: signature,
sdkKey: this.sdkKey,
meetingNumber: this.meetingNumber,
password: this.passWord,
userName: this.userName
})
}

Code Snippet Node JS:
app.post(‘/zoom/signature’, (req, res) => {
const iat = Math.round(new Date().getTime() / 1000) - 30;
const exp = iat + 60 * 60 * 2;
const oHeader = { alg: ‘HS256’, type: ‘JWT’ };
const oPayload = {
sdkKey: config.ZOOM.MEETING_SDK_KEY,
mn: req.body.meetingNumber,
role: req.body.role,
iat: iat,
exp: exp,
appKey: config.ZOOM.MEETING_SDK_KEY,
tokenExp: iat + 60 * 60 * 2
};
const sHeader = JSON.stringify(oHeader);
const sPayload = JSON.stringify(oPayload);
const signature = KJUR.jws.JWS.sign(‘HS256’, sHeader, sPayload, config.ZOOM.MEETING_SDK_SECRET);
console.log(signature);
res.json({
signature: signature
});
});

are you able to share your JWT token here? An expired one will do fine as well.

Hi, does anyone have solution to this, Im still stuck on this issue :cry:

check your created signature here

and perhaps have a look into this thread → first try the CDN example and if this works go forward

I have checked my jwt signature from jwt.io, it seems to me that the payload and header is already correct. Here is my signature:

eyJhbGciOiJIUzI1NiIsInR5cGUiOiJKV1QifQ.eyJzZGtLZXkiOiIzb3NMZ0UxZVRzV3RpTmYyMzhlWmR3IiwibW4iOiI1MzY4ODgzNjc1Iiwicm9sZSI6IjAiLCJpYXQiOjE2ODA5NDk4OTEsImV4cCI6MTY4MDk1NzA5MSwiYXBwS2V5IjoiM29zTGdFMWVUc1d0aU5mMjM4ZVpkdyIsInRva2VuRXhwIjoxNjgwOTU3MDkxfQ.tgSfR0iTPoRrVhmiKh45Mc2fQ6EkbXABkIsJZ3c5A4g

I have also tried the local cdn method, however upon joining the meeting, it pops up this error:

Thanks for helping btw :slight_smile:

did you create your Meeting SDK App after Feb 11, 2023?

if yes - use " Client ID" & “Client Secret”
if no - use “SDK Key” &" SDK Secret"

id