Fail to join meeting, invalid parameter when starting meeting

Description
When I’m trying to connect to a meeting room I’m getting an error Fail to join the meeting. Invalid Parameter, this only appears when i start the meeting, before that it displays like it should that the meeting has not started yet and it’s waiting for the host to start the meeting so it is not a signature generation issue and I’m not using a JWT app type for for the key and secret.

Browser Console Error
{type: 'JOIN_MEETING_FAILED', reason: 'Invalid Parameter', errorCode: 4003}

Which Web Meeting SDK version?
2.8.0

Meeting SDK Code Snippets

data () {
        return {
        client: ZoomMtgEmbedded.createClient(),
        sdkKey: this.sdkKeyData,
        sdkSecret: this.sdkSecretData,
        meetingNumber: "...",
        passWord: "...",
        role: 0,
        signatureEndpoint: "/academy/zoom-signature",
        userEmail: this.user.email,
        userName: this.user.full_name,
        }
    },
    methods: {
        getSignature() {
        axios.post(this.signatureEndpoint, {
            meetingNumber: this.meetingNumber,
            role: this.role
        })
        .then(res => {
            console.log(res.data.signature);
            this.startMeeting(res.data.signature);
        })
        .catch(error => {
            console.log(error);
        });
        },
        startMeeting(signature) {
        let meetingSDKElement = document.getElementById('meetingSDKElement');

        this.client.init({
            debug: true,
            zoomAppRoot: meetingSDKElement,
            language: 'en-US',
            customize: {
            meetingInfo: ['topic', 'host', 'mn', 'pwd', 'telPwd', 'invite', 'participant', 'dc', 'enctype'],
            toolbar: {
                buttons: [
                {
                    text: 'Custom Button',
                    className: 'CustomButton',
                    onClick: () => {
                    console.log('custom button');
                    }
                }
                ]
            }
            }
        });

        this.client.join({
            sdkKey: this.sdkKey,
            signature: signature,
            meetingNumber: this.meetingNumber,
            password: this.passWord,
            userName: this.userName,
            userEmail: this.userEmail
        })
        }
    }

Also generating the signature like below:

public function zoom_signature() {

        $data = request()->validate([
            'meetingNumber' => 'required',
            'role' => 'required'
        ]);

        $sdk_key = env('ZOOM_SDK_KEY');
        $sdk_secret = env('ZOOM_SDK_SECRET');
        $meeting_number = $data['meetingNumber'];
        $role = $data['role'];

        $token = array(
            "sdkKey" => $sdk_key,
            "mn" => $meeting_number,
            "role" => $role,
            "iat" => time(),
            "exp" => time() + 3600, //60 seconds as suggested
            "tokenExp" => time() + 3600,
        );

        $signature = JWT::encode($token, $sdk_secret, 'HS256');

        return response([
            'signature' => $signature
        ], 200);
    }

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Client waits for the meeting to start
  2. Start Meeting
  3. Error to client
1 Like

Issue resolved.

userName was undefined and for that reason the error invalid parameter appeared.

1 Like

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