# Invalid sdkkey in my react app

**URL:** <https://devforum.zoom.us/t/invalid-sdkkey-in-my-react-app/121481>\
**Category:** Meeting SDK\
**Created:** [November 25, 2024, 2:34pm UTC](https://devforum.zoom.us/t/invalid-sdkkey-in-my-react-app/121481 "2024-11-25T14:34:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sendtoife](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sendtoife/32/65214_2.png) [@sendtoife](https://devforum.zoom.us/u/sendtoife)\
**Post date:** [November 25, 2024, 2:34pm UTC](https://devforum.zoom.us/t/invalid-sdkkey-in-my-react-app/121481/1 "2024-11-25T14:34:45Z")

</div>

Hi,

I keep getting - { method: “join”, status: false, result: “Invalid sdkkey.”, errorCode: 1, errorMessage: “Fail to join the meeting.” }

I am using the correct SDK key I got under sdk credentials in my app dashboard.  
I am generating the signature using my php code below:

public function generateSignature(Request $request) {

```
    $key = env('ZOOM_API_KEY');
    $secret = env('ZOOM_API_SECRET');

     // Validate the JSON input
     $validatedData = $request->validate([
        'meetingNumber' => 'required|numeric',
        'role' => 'required|in:0,1', // 0 for attendee, 1 for host
    ]);

    $meeting_number = $validatedData["meetingNumber"];
    $role = $validatedData["role"];

    $token = array(
        "sdkKey" => $key,
        "mn" => $meeting_number,
        "role" => $role,
        "iat" => time(),
        "exp" => time() + 3600, //60 seconds as suggested
        "tokenExp" => time() + 3600,
    );
    $encode = \Firebase\JWT\JWT::encode($token, $secret, 'HS256');

    return response()->json(['signature' => $encode]);

    // return [
    // 'token'=>$encode
    // ];
}

```

How can i resolve this issue?

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [November 27, 2024, 2:40pm UTC](https://devforum.zoom.us/t/invalid-sdkkey-in-my-react-app/121481/2 "2024-11-27T14:40:02Z")

</div>

Hi @sendtoife  
Thanks for reaching out to us and welcome to the Zoom Developer Community!  
If you are using the meeting SDK, you should not be using API key and secret, you should be using client credentials

Here is our react sample app for meeting SDK

> **[GitHub - zoom/meetingsdk-react-sample: Use the Zoom Meeting SDK in React](https://github.com/zoom/meetingsdk-react-sample)**
>
> Use the Zoom Meeting SDK in React

---

<div class="post-metadata">

**Author:** ![sendtoife](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sendtoife/32/65214_2.png) [@sendtoife](https://devforum.zoom.us/u/sendtoife)\
**Post date:** [November 27, 2024, 3:08pm UTC](https://devforum.zoom.us/t/invalid-sdkkey-in-my-react-app/121481/3 "2024-11-27T15:08:40Z")

</div>

Hi,

Thanks for that, if that is the case and I have my client id and secret. how do i generate meeting number. I ask because the create meeting api requires a secret token which has been rejecting my client secret.

What do I do?

---

<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:** [November 28, 2024, 3:26am UTC](https://devforum.zoom.us/t/invalid-sdkkey-in-my-react-app/121481/4 "2024-11-28T03:26:49Z")

</div>

@sendtoife

Your sdkKey is Client ID  
Your sdkSecret is Client Secret

You cannot generate a meeting number from Meeting SDK.  
You need to use the REST API to create a meeting. This will give you a meeting number. Thereafter use Meeting SDK to join the meeting number,
