# Invalid Signature Issue While Initializing Meet

**URL:** <https://devforum.zoom.us/t/invalid-signature-issue-while-initializing-meet/65576>\
**Category:** Web\
**Tags:** web-meeting-sdk\
**Created:** [March 10, 2022, 10:35am UTC](https://devforum.zoom.us/t/invalid-signature-issue-while-initializing-meet/65576 "2022-03-10T10:35:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yourphysio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yourphysio/32/35847_2.png) [@yourphysio](https://devforum.zoom.us/u/yourphysio)\
**Post date:** [March 10, 2022, 10:35am UTC](https://devforum.zoom.us/t/invalid-signature-issue-while-initializing-meet/65576/1 "2022-03-10T10:35:00Z")

</div>

Hey there, we trying to use @zoomus/websdk in our patient app and facing invalid signature issue.

We’ve assured that the meeting number is correct. Attaching information related to that here:

Signature: QXpXbV9mQ2JTdUdGQkxvZmk3bEg4US45NjAzNTA3OTIwLjE2NDY5MDY0OTE0NTUuMC5INGQ5NEpjajRMUzlwNi9Gc3ZtRmJ1bjN2VnAzZG9ZT3pMNG85WUJPUGNjPQ==

Meeting Number: 96035xxxxx

Code used to generate is deployed on heroku with JWT key and secret and is same to this: [GitHub - zoom/meetingsdk-sample-signature-node.js: Generate a signature to Start and Join Meetings and Webinars with the Zoom Web Meeting SDK.](https://github.com/zoom/meetingsdk-sample-signature-node.js)

Code on our end to initialize chat:

```auto
import ZoomMtgEmbedded from '@zoomus/websdk/embedded';

interface StartMeetingProps {
  signature: string | undefined;
  meetingNumber: string | undefined;
  username: string | undefined;
  password: string | undefined;
}

interface GetSignatureProps {
  event: any;
  meetingNumber: string | undefined;
  username: string | undefined;
  password: string | undefined;
}

const getSignature = (props: GetSignatureProps) => {
  const { event, meetingNumber, password, username } = props || {};
  event.preventDefault();

  fetch(process.env.REACT_APP_ZOOM_SIGNATURE_ENDPOINT!, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      meetingNumber: meetingNumber,
      role: 0
    })
  })
    .then((res) => res.json())
    .then((response) => {
      const meetingProps = {
        signature: response.signature,
        meetingNumber: meetingNumber,
        username: username,
        password: password
      };
      startMeeting(meetingProps);
    })
    .catch((error) => {
      console.error(error);
    });
};

const startMeeting = (props: StartMeetingProps) => {
  const rootElement: HTMLElement = document.getElementById(
    'ZoomEmbeddedApp'
  ) as HTMLElement;
  const { signature, meetingNumber, username, password } = props || {};

  // get meeting args from url
  const meetingConfig = {
    apiKey: process.env.REACT_APP_ZOOM_SIGNATURE_ENDPOINT,
    meetingNumber: meetingNumber,
    userName: username,
    password: password,
    leaveUrl: '/home',
    role: 0,
    userEmail: '',
    lang: 'en-US',
    signature: signature || '',
    webEndpoint: 'zoom.us'
  };

  if (!meetingConfig.signature) {
    console.log('no signature found');
  } else {
    const zmClient = ZoomMtgEmbedded.createClient();

    const tmpPort =
      window.location.port === '' ? '' : ':' + window.location.port;
    const avLibUrl =
      window.location.protocol +
      '//' +
      window.location.hostname +
      tmpPort +
      '/lib';

    zmClient
      .init({
        debug: true,
        zoomAppRoot: rootElement,
        assetPath: avLibUrl,
        language: meetingConfig.lang
      })
      .then((e: any) => {
        console.log('init success', e);
      })
      .catch((e: any) => {
        console.log('init error', e);
      });

    console.log(signature, meetingNumber);
    // WebSDK Embedded join
    zmClient
      .join({
        apiKey: meetingConfig.apiKey || '',
        signature: meetingConfig.signature,
        meetingNumber: meetingConfig.meetingNumber || '',
        userName: meetingConfig.userName || '',
        password: meetingConfig.password,
        userEmail: meetingConfig.userEmail
      })
      .then((e: any) => {
        console.log('join success', e);
      })
      .catch((e: any) => {
        console.log('join error', e);
      });
  }
};

export { getSignature };

```

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [April 8, 2022, 7:43am UTC](https://devforum.zoom.us/t/invalid-signature-issue-while-initializing-meet/65576/2 "2022-04-08T07:43:49Z")

</div>

Hi @yourphysio ,

I see your Signature is encoded.  
In comparison to the response from the sample signature node, the signature should not be encoded.

The samples response from [GitHub - zoom/meetingsdk-sample-signature-node.js: Generate a signature to Start and Join Meetings and Webinars with the Zoom Meeting SDKs.](https://github.com/zoom/meetingsdk-sample-signature-node.js#example-request) gives you something like

```auto
{
  "signature": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiJhYmMxMjMiLCJtbiI6IjEyMzQ1Njc4OSIsInJvbGUiOjAsImlhdCI6MTY0NjkzNzU1MywiZXhwIjoxNjQ2OTQ0NzUzLCJhcHBLZXkiOiJhYmMxMjMiLCJ0b2tlbkV4cCI6MTY0Njk0NDc1M30.UcWxbWY-y22wFarBBc9i3lGQuZAsuUpl8GRR8wUah2M"
}

```

If you look at the signature closely, it should follow the format of `

```auto
{
"signature":"aaaaaaaaa.bbbbbbbbbbbb.ccccccccccccccc"
}

```

There are 3 portion of the string, with . as delimiter.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 8, 2022, 5:44pm UTC](https://devforum.zoom.us/t/invalid-signature-issue-while-initializing-meet/65576/3 "2022-05-08T17:44:21Z")

</div>

Closed on May 8, 2022, 5:44pm UTC

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