# {"type": "INVALID\_PARAMETERS", "reason": "userId is not correct" }, { "type": "INVALID\_PARAMETERS", "reason": "userId is not correct" }

**URL:** <https://devforum.zoom.us/t/type-invalid-parameters-reason-userid-is-not-correct-type-invalid-parameters-reason-userid-is-not-correct/95876>\
**Category:** Meeting SDK\
**Created:** [September 27, 2023, 11:55am UTC](https://devforum.zoom.us/t/type-invalid-parameters-reason-userid-is-not-correct-type-invalid-parameters-reason-userid-is-not-correct/95876 "2023-09-27T11:55:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aishwarya.wappnet](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/aishwarya.wappnet/32/51213_2.png) [@aishwarya.wappnet](https://devforum.zoom.us/u/aishwarya.wappnet)\
**Post date:** [September 27, 2023, 11:55am UTC](https://devforum.zoom.us/t/type-invalid-parameters-reason-userid-is-not-correct-type-invalid-parameters-reason-userid-is-not-correct/95876/1 "2023-09-27T11:55:28Z")

</div>

I am using zoomus/websdk component view.

When i join the meeting, {“type”: “INVALID\_PARAMETERS”, “reason”: “userId is not correct” } error is logged.

When i end the meeting {type: ‘IMPROPER\_MEETING\_STATE’, reason: ‘closed’} is displayed.

How are these errors to be handled?

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [September 27, 2023, 8:11pm UTC](https://devforum.zoom.us/t/type-invalid-parameters-reason-userid-is-not-correct-type-invalid-parameters-reason-userid-is-not-correct/95876/2 "2023-09-27T20:11:49Z")

</div>

@aishwarya.wappnet,

Thank you for reaching out to the Developer Forum. In order to provide you with the best possible support, we kindly request that you share a screenshot of the browser console and include your Web SDK join method. By providing us with this information, we will be able to better understand the context of the issue and help diagnose what may be happening. Once we have this information we can help diagnose what may be happening.

---

<div class="post-metadata">

**Author:** ![aishwarya.wappnet](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/aishwarya.wappnet/32/51213_2.png) [@aishwarya.wappnet](https://devforum.zoom.us/u/aishwarya.wappnet)\
**Post date:** [September 28, 2023, 6:42am UTC](https://devforum.zoom.us/t/type-invalid-parameters-reason-userid-is-not-correct-type-invalid-parameters-reason-userid-is-not-correct/95876/3 "2023-09-28T06:42:20Z")

</div>

Init and Join methods!

try {  
const client = await ZoomMtgEmbedded.createClient();

```
  const tmpPort = window.location.port === "" ? "" : ":" + window.location.port;

  const avLibUrl =
    window.location.protocol +
    "//" +
    window.location.hostname +
    tmpPort +
    "/lib";
  let meetingSDKElement = document.getElementById('meetingSDKElement')

  client.init({
    debug: true,
    webEndpoint: 'zoom.us',
    zoomAppRoot: meetingSDKElement,
    language: 'en-US',
    assetPath: avLibUrl,
    disableDraggable: true,
    leaveUrl: 'http://localhost:3000/dashboard',
    customize: {
      video: {
        isResizable: false,
        defaultViewType: "gallery",
        popper: {
          disableDraggable: true,
        },
        viewSizes: {
          default: {
            width: 600,
            height: "100%",
          }
        }
      },
    }
  }).then((res) => {
    console.log('success');
  }).catch((error) => {
    console.log(error);
  })

  client.join({
    topic: 'Meeting',
    sdkKey: process.env.REACT_APP_SDK_KEY,
    signature: signature,
    meetingNumber: "83147374877",
    password: "177610",
    userName: "Linux#chrome/117.0.0.0",
    success: function (res) {
      console.log(res);
      console.log('success');

    },
    error: function (res) {
      console.log('error');
    }
  }).then((res) => {
    console.log(res);

  }).catch((res) => {
    console.log('catch error', res);
  })
} catch (error) {
  console.log(error);
}

```

When i join the meeting

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/f/af800da2e7a0f890092d8a245bda8179ea56cd09.png)

When i end the meeting:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/b/abe1fe4fa42ce5fb7446188a8dfada17cc0fd73f.png)

I have followed the [@zoomus/websdk - npm](https://www.npmjs.com/package/@zoomus/websdk) and the [Meeting SDK - web - component view - Meetings](https://developers.zoom.us/docs/meeting-sdk/web/component-view/meetings/) documentations. I am just unable to solve mentioned issue.

This meeting sdk is being integrated in react. Is there something extra to be configured in the project? Please give me the solution for the above mentioned issue such that it works on both PRODUCTION and DEVELOPMENT.

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [September 29, 2023, 8:45pm UTC](https://devforum.zoom.us/t/type-invalid-parameters-reason-userid-is-not-correct-type-invalid-parameters-reason-userid-is-not-correct/95876/4 "2023-09-29T20:45:42Z")

</div>

> [@aishwarya.wappnet](#):
>
> This meeting sdk is being integrated in react. Is there something extra to be configured in the project? Please give me the solution for the above mentioned issue such that it works on both PRODUCTION and DEVELOPMENT.

It is unclear what issue you are facing. Are you saying that the SDK works in the developer environment but not in production? If that is the case, could you please explain how you are deploying to production and provide details about what was working and what broke during your developer process? Deploying the SDK should not require any additional configuration.

Additionally, please verify that you are using the correct user ID. I recommend double-checking the role you have when joining the meeting. Are you the host or a participant?

---

<div class="post-metadata">

**Author:** ![kikketer](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/kikketer/32/55850_2.png) [@kikketer](https://devforum.zoom.us/u/kikketer)\
**Post date:** [January 24, 2024, 10:01pm UTC](https://devforum.zoom.us/t/type-invalid-parameters-reason-userid-is-not-correct-type-invalid-parameters-reason-userid-is-not-correct/95876/5 "2024-01-24T22:01:44Z")

</div>

Any updates on what I should do with this? I’m getting the same error using a react project and very baseline (the react-sample app).

I’ve looked at the min.js file and it seems to be something around `if(!l().video.subscribedVideoList.includes(n))return Promise.reject({type:Np,reason:"userId is not correct"})`

The question is “what is video.subscribedVideoList” and "how do I get it to include “n” (whatever n is at this point)

---

<div class="post-metadata">

**Author:** ![aishwarya.wappnet](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/aishwarya.wappnet/32/51213_2.png) [@aishwarya.wappnet](https://devforum.zoom.us/u/aishwarya.wappnet)\
**Post date:** [January 25, 2024, 10:03am UTC](https://devforum.zoom.us/t/type-invalid-parameters-reason-userid-is-not-correct-type-invalid-parameters-reason-userid-is-not-correct/95876/6 "2024-01-25T10:03:30Z")

</div>

You need to install the specified packages as part of the project’s development dependencies. These packages are crucial for customizing the default behavior of a Create React App. The reason for this customization is that the SDK utilized in the project requires specific headers to be passed to the application.

Furthermore, the provided ‘config-overrides.js’ script should be added to the ‘src’ directory of your project. This script utilizes the functionalities provided by ‘customize-cra’, ‘copy-webpack-plugin’, and other packages to modify the webpack configuration.

1. Add the following dependencies to your project’s ‘devDependencies’ in the ‘package.json’ file:

```auto
npm install --save-dev copy-webpack-plugin customize-cra react-app-rewired write-file-webpack-plugin

```

1. Customization Script: Create a ‘config-overrides.js’ file with the following content and place it in the ‘src’ directory of your project:

```auto
const { override, addWebpackPlugin, overrideDevServer } = require('customize-cra');
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const addDevServerCOOPReponseHeader = (config) => {
    config.client = {
        overlay: {
            errors: false,
            warnings: false,
            runtimeErrors: false,
        },
    };
    config.headers = {
        ...config.headers,
        'Cross-Origin-Embedder-Policy': 'require-corp',
        'Cross-Origin-Opener-Policy': 'same-origin'
    };
    config.devMiddleware = {
        ...config.devMiddleware,
        writeToDisk: true,
    };
    return config;
};

module.exports = {
    webpack: override(
        addWebpackPlugin(
            new CopyPlugin({
                patterns: [
                    {
                        from: path.resolve(__dirname, 'node_modules', '@zoomus', 'websdk', 'dist', 'lib', 'av'),
                        to: path.resolve(__dirname, 'public', 'lib')
                    }
                ]
            })
        )
    ),
    devServer: overrideDevServer(addDevServerCOOPReponseHeader)
};

```

I hope this helps :)Preformatted text

---

<div class="post-metadata">

**Author:** ![seansmith1020](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/seansmith1020/32/49379_2.png) [@seansmith1020](https://devforum.zoom.us/u/seansmith1020)\
**Post date:** [February 7, 2024, 6:58am UTC](https://devforum.zoom.us/t/type-invalid-parameters-reason-userid-is-not-correct-type-invalid-parameters-reason-userid-is-not-correct/95876/7 "2024-02-07T06:58:26Z")

</div>

Does this need to be added to get some of the normal MeetingSDK customization working?

If so, why?
