Signature is invalid in react app

Description
I have create an app, and followed the instruction found here https://www.npmjs.com/package/@zoomus/websdk, but always get “Signature is invalid” error

Error
Signature is invalid.

Which version?
1.8.5

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Create app in Zoom Marketplace
  2. Clone https://github.com/zoom/websdk-sample-signature-node.js to local
  3. Add .env file with my SDK Key and Secret
  4. Start node project
  5. Create new React app
  6. Add @zoomus/websdk package and made node_modules/@zoomus/websdk/dist/lib/ folder accessible
  7. Add this code to initialize ZoomMeeting

import { ZoomMtg } from ‘@zoomus/websdk’
import http from ‘axios’

const signatureEndpoint = ‘localhost:4000’ (with http://)
const apiKey = ‘MY_APIKEY’
const meetingNumber = ‘MY_MEETING_NR’
const role = 0
const leaveUrl = ‘localhost:3000’ (with http://)
const userName = ‘Test user’
const userEmail = ‘’
const passWord = ‘’

ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
http.post(signatureEndpoint, {
“meetingNumber”: meetingNumber,
“role”: role
}).then(response => {
ZoomMtg.init({
leaveUrl: leaveUrl,
isSupportAV: true,
success: (success) => {
console.log(success)
ZoomMtg.join({
signature: response.data.signature,
meetingNumber: meetingNumber,
userName: userName,
apiKey: apiKey,
userEmail: userEmail,
passWord: passWord,
success: (success) => {
console.log(success)
},
error: (error) => {
console.error(‘Err’)
console.log(error)
}
})

    },
    error: (error) => {
        console.log(error)
    }
})

})

Hey @partitatripla,

Happy to help! Can you please provide your Web SDK Signature for a test meeting with the issue so I can debug it for you?

Thanks,
Tommy

Hi, thanks for the reply.
This is the key: SnFRbUs3ajRVcVlTVFNyR2ttNWVYcjZkcUdFRFVYMnVKb0Z5LjkyMDA0NzQ4NDkuMTYwODc5ODM3MTY5MC4wLkVRWWVLUTBkTDlXVFlsTEFNbEszVmNiWmRZMTJXaXZNNk12M09YQTZvNGs9

Hey @partitatripla,

Thank you for providing additional information. Just to clarify, are you using this signature to join a meeting that was already started? It’s important to note that when using the role of 0, the Web SDK will only attempt to join an ongoing meeting. Looking at our internal system, it looks like that meeting, in particular, was removed. Please try joining an existing and ongoing meeting or changing the role to 1 and starting a meeting.

I hope that helps!

Thanks,
Max

I’ve tried both thing,

  • start the meeting with given ID (920 xxx xx49)
  • set role to 1 and try to start a meeting.
    But in both case i receive the same error “Signature is invalid”

Hey @partitatripla,

After debugging your signature, you are using an SDK App instead of a JWT App.

Please create a JWT App and use those credentials to generate the signature. :slight_smile:

Thanks,
Tommy