Signature is invalid in react app

Description
I have create an app, and followed the instruction found here @zoomus/websdk - npm, 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 GitHub - zoom/meetingsdk-auth-endpoint-sample: Generate a Meeting SDK JWT to join Zoom meetings and webinars with the Meeting SDK. 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 to developersupport@zoom.us with the issue so I can debug it for you?

Thanks,
Tommy

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

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

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