# Fail to join meeting, Error Code 200

**URL:** <https://devforum.zoom.us/t/fail-to-join-meeting-error-code-200/119676>\
**Category:** Web\
**Tags:** api, sdk\
**Created:** [October 23, 2024, 11:45am UTC](https://devforum.zoom.us/t/fail-to-join-meeting-error-code-200/119676 "2024-10-23T11:45:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kuatbek.k](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@kuatbek.k](https://devforum.zoom.us/u/kuatbek.k)\
**Post date:** [October 23, 2024, 11:45am UTC](https://devforum.zoom.us/t/fail-to-join-meeting-error-code-200/119676/1 "2024-10-23T11:45:04Z")

</div>

Where to get sdk\_key and sdk\_secret? It looks like we need to create SDK app type. But the only options I have is General app, Server-to-server Oauth and Webhook

---

<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:** [October 24, 2024, 7:05am UTC](https://devforum.zoom.us/t/fail-to-join-meeting-error-code-200/119676/2 "2024-10-24T07:05:02Z")

</div>

@kuatbek.k

Create a General App and enable Meeting SDK in the embed tab.

The SDK Key is Client ID  
The SDK Secret is Client Secret

---

<div class="post-metadata">

**Author:** ![kuatbek.k](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@kuatbek.k](https://devforum.zoom.us/u/kuatbek.k)\
**Post date:** [October 24, 2024, 9:42am UTC](https://devforum.zoom.us/t/fail-to-join-meeting-error-code-200/119676/3 "2024-10-24T09:42:13Z")

</div>

Hey @chunsiong.zoom !  
Thank you for your reply!

We created General App and enabled Meeting SDK in the embed tab. The status of the app is Draft. But we’re trying to use Development mode.

Our project is a platform for tutors and students. So, both of them can join to the lesson with the help of Zoom. We need to make tutors as host and students as participants if possible so that they can start and join the meeting without us (admins).

Could you please take a look at our current implementation because we’re getting an error (below description) and tell us what we are doing wrong?

Can we use the general app for testing before publishing and using it in production?

Thanks in advance!

Below is current implementation.

We use API endpoint of Zoom for creating a meeting on BE:

```auto
$response = Http::withToken($accessToken)
    ->post($this->apiUrl . '/users/me/meetings', [
        'topic' => $data['topic'],
        'type' => 2, // Scheduled meeting
        'start_time' => $startTimeUTC, // In 'YYYY-MM-DDTHH:MM:SSZ' format
        'duration' => $data['duration'], // In minutes
        'timezone' => 'UTC',
        'settings' => [
            'join_before_host' => true,
            'host_video' => true,
            'participant_video' => true,
            'mute_upon_entry' => true,
        ],
    ]);

```

On FE we create a valid signature and try to join to the meeting using **@zoom/meetingsdk/embedded**. The version is in package.json: `"@zoom/meetingsdk": "^3.9.0",`

```auto
import ZoomMtgEmbedded from '@zoom/meetingsdk/embedded';

const [client, setClient] = useState<ReturnType<typeof ZoomMtgEmbedded.createClient> | null>(
    null
  );

useEffect(() => {
    if (typeof window !== 'undefined') {
      const newClient = ZoomMtgEmbedded.createClient();
      setClient(newClient);
    }
  }, []);

const createMeeting = () => {
    const meetingNumber = 82351497329;
    const signature = generateSignature(
      'Client ID',
      'Client Secret',
      meetingNumber.toString(),
      isStudent ? 0 : 1
    );

    startMeeting(signature, meetingNumber.toString());
  };

  async function startMeeting(signature: string, meetingNumber: string) {
    const meetingSDKElement = document.getElementById('meetingSDKElement')!;
    try {
      await client?.init({
        zoomAppRoot: meetingSDKElement,
        language: 'en-US',
        patchJsMedia: true,
        leaveOnPageUnload: true,
      });
      console.log('init');

      console.log('signature', signature);
      console.log('meetingNumber', meetingNumber);
      await client?.join({
        signature,
        sdkKey: 'Client ID',
        meetingNumber,
        userName: isStudent ? (lesson.student_name as string) : (lesson.tutor_name as string),
        password: 'NcX3a5',
      });
      console.log('joined successfully');
    } catch (error) {
      console.log(error);
    }
  }

```

here is signature: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiJzWjV5SndKU1NRYVZUY05ESUdSWVF3IiwibW4iOiI4MjM1MTQ5NzMyOSIsInJvbGUiOjAsImlhdCI6MTcyOTc2MTg1OSwiZXhwIjoxNzI5NzY5MDU5LCJ0b2tlbkV4cCI6MTcyOTc2OTA1OX0.gngbMSNwkC7AAYxcpHQvem1b5sLBlEUAusDJghM8QG4`

here is meeting number: 82351497329

We got a following error:

```auto
{
    "type": "JOIN_MEETING_FAILED",
    "reason": "Fail to join the meeting.",
    "errorCode": 200
}

```

Function for generating signature:

```auto
import { KJUR } from 'jsrsasign';

export function generateSignature(
  sdkKey: string,
  sdkSecret: string,
  meetingNumber: string,
  role: number
): string {
  const iat = Math.floor(new Date().getTime() / 1000) - 30; // issue time
  const exp = iat + 60 * 60 * 2; // expiration time (valid for 2 hours)

  // Create the signature payload
  const oHeader = { alg: 'HS256', typ: 'JWT' };
  const oPayload = {
    sdkKey: sdkKey,
    mn: meetingNumber,
    role: role,
    iat: iat,
    exp: exp,
    tokenExp: exp,
  };

  // Encode the header, payload, and secret
  const sHeader = JSON.stringify(oHeader);
  const sPayload = JSON.stringify(oPayload);

  // Create the signature
  const signature = KJUR.jws.JWS.sign('HS256', sHeader, sPayload, sdkSecret);

  return signature;
}

```

---

<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:** [October 25, 2024, 5:58am UTC](https://devforum.zoom.us/t/fail-to-join-meeting-error-code-200/119676/4 "2024-10-25T05:58:59Z")

</div>

@kuatbek.k are you using the development client ID and client secret?

could you also capture the tracking ID for me to take a look?

on your browser console

1. go to network tab
2. under the request, look for the url which looks something like info?meetingNumber=…
3. Under the response, look for the x-zm-trackingID and paste the tracking ID in clear text here.  
 ![Screenshot 2023-11-16 at 2.54.58 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/1/81c7966409dabbaba25282e238c0390cdb186c9b.png)

---

<div class="post-metadata">

**Author:** ![kuatbek.k](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@kuatbek.k](https://devforum.zoom.us/u/kuatbek.k)\
**Post date:** [October 25, 2024, 12:37pm UTC](https://devforum.zoom.us/t/fail-to-join-meeting-error-code-200/119676/5 "2024-10-25T12:37:53Z")

</div>

Hey @chunsiong.zoom!

Yes we use client ID & client secret of development.

There is no such url in network tab but there is something like this: `/info?apikey=`

this is the tracking ID: v=2.0;clid=us05;rid=WEB\_6a5ee6a2aeec12a766ce8e953b064ba4

this is new signature:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiJzWjV5SndKU1NRYVZUY05ESUdSWVF3IiwibW4iOiI4MjM1MTQ5NzMyOSIsInJvbGUiOjEsImlhdCI6MTcyOTg1OTUwMiwiZXhwIjoxNzI5ODY2NzAyLCJ0b2tlbkV4cCI6MTcyOTg2NjcwMn0.a6NpS97kePIfbdUCUbBntXdmslnLgC7GGAcwzT2j6OE

the meeting number is the same as above

---

<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:** [October 25, 2024, 2:19pm UTC](https://devforum.zoom.us/t/fail-to-join-meeting-error-code-200/119676/6 "2024-10-25T14:19:29Z")

</div>

@kuatbek.k ,

seems like this signature is ok

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/7/e75d1312e5a35fc2a4f3b68efcbc9898b0cd0983.png)

have you tried with the sample code yet?

---

<div class="post-metadata">

**Author:** ![kuatbek.k](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@kuatbek.k](https://devforum.zoom.us/u/kuatbek.k)\
**Post date:** [October 25, 2024, 7:43pm UTC](https://devforum.zoom.us/t/fail-to-join-meeting-error-code-200/119676/7 "2024-10-25T19:43:29Z")

</div>

@chunsiong.zoom

yes, we use next js `"next": "^13.0.7"` and the react version is `"react": "18.2.0"`

I have some concerns about properties like zak, tk, password (above in the code). Do we really need them? Maybe because of that we have this error with joining?

Also we cannot identify what exactly is wrong because of general error code - 200. And is there any other way of debugging it?

---

<div class="post-metadata">

**Author:** ![kuatbek.k](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@kuatbek.k](https://devforum.zoom.us/u/kuatbek.k)\
**Post date:** [October 27, 2024, 2:26pm UTC](https://devforum.zoom.us/t/fail-to-join-meeting-error-code-200/119676/8 "2024-10-27T14:26:49Z")

</div>

@chunsiong.zoom Could you please also provide with the link of sample code you use there to retrieve the result in image above?

---

<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:** [October 28, 2024, 7:30am UTC](https://devforum.zoom.us/t/fail-to-join-meeting-error-code-200/119676/9 "2024-10-28T07:30:38Z")

</div>

@kuatbek.k try this out

> **[GitHub - zoom/meetingsdk-web-sample: Zoom Meeting SDK web sample](https://github.com/zoom/meetingsdk-web-sample)**
>
> Zoom Meeting SDK web sample

I don’t use ZAK and tk for the time being.  
Password is mandatory most of the time

---

<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:** [November 27, 2024, 5:30pm UTC](https://devforum.zoom.us/t/fail-to-join-meeting-error-code-200/119676/10 "2024-11-27T17:30:44Z")

</div>

Closed on November 27, 2024, 5:30pm UTC

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