Invalid signature token

My Meeting SDK Account uses server-to-server OAuth. I have been able to create meetings using the APIs, but on using the same client_id and client_secret to start a meeting with the Web Implementation of the SDK, I get the invalid signature error.

“method”: “join”,
“status”: false,
“result”: “Invalid signature.”,
“errorMessage”: “Signature is invalid.”,
“errorCode”: 3712

Meeting SDK Code Snippets
`const iat = Math.round(new Date().getTime() / 1000) - 30;
const exp = iat + 60 * 60 * 2;

const oHeader = { alg: ‘HS256’, typ: ‘JWT’ };

const oPayload = {
sdkKey: sdkKey,
mn: meetingNumber,
role: role,
iat: iat,
exp: exp,
appKey: sdkKey,
tokenExp: exp

const sHeader = JSON.stringify(oHeader);
const sPayload = JSON.stringify(oPayload);
const signature = KJUR.jws.JWS.sign(‘HS256’, sHeader, sPayload, sdkSecret);`

This is my key:

Hi @ashwini2
Thanks for reaching out to us!
The issue you are seeing is expected. You should not be using your Server to Server OAuth credentials to create your signature.
You should be working with a general app and use those credentials to generate your signature.

Here is one of our sample apps that could help you to troubleshoot this

Hope this helps!

1 Like

Thanks for the solution.

1 Like