Error code 1 when creating zoom meeting via sdk

Description/Error
using the demo provided in github I change the role to be equal 1 to create a meeting i get this error

  1. {method: “join”, status: false, errorCode: 1, errorMessage: “Invalid signature.”, result: null}

  2. errorCode: 1

  3. errorMessage: “Invalid signature.”

  4. method: “join”

  5. result: null

  6. status: false

Hey @abdelazizwaheed11, thanks for posting and using Zoom!

Are you passing in JWT App Credentials for the API key and secret?

Please share the code you are using to generate the signature so we can help.

Thanks,
Tommy

@tommy yes i’m passing api key and secret from my dashboard also the account is pro account
those keys are not real for privacy purpose

here is index.js file

(function(){

	console.log('checkSystemRequirements');
	console.log(JSON.stringify(ZoomMtg.checkSystemRequirements()));

    // it's option if you want to change the jssdk dependency link resources.
    // ZoomMtg.setZoomJSLib('https://source.zoom.us/1.6.0/lib', '/av'); // CDN version default
    // ZoomMtg.setZoomJSLib('https://jssdk.zoomus.cn/1.6.0/lib', '/av'); // china cdn option 
    // ZoomMtg.setZoomJSLib('http://localhost:9999/node_modules/zoomus-jssdk/dist/lib', '/av'); // Local version default
    ZoomMtg.preLoadWasm();

    ZoomMtg.prepareJssdk();
    // I changed api key and secret for privacy 
    var API_KEY = 'CfVT2ARVRxWcjL5eqeqShUcivQ';

    /**
     * NEVER PUT YOUR ACTUAL API SECRET IN CLIENT SIDE CODE, THIS IS JUST FOR QUICK PROTOTYPING
     * The below generateSignature should be done server side as not to expose your api secret in public
     * You can find an eaxmple in here: https://marketplace.zoom.us/docs/sdk/native-sdks/Web-Client-SDK/tutorial/generate-signature
     */
    var API_SECRET = '4vIEEyGIpx0uQj0eqeqesln6qIcIolxMwnwa9GI5M';

    document.getElementById('join_meeting').addEventListener('click', function(e){
        e.preventDefault();

        if(!this.form.checkValidity()){
            alert("Enter Name and Meeting Number");
            return false;
        }

        var meetConfig = {
            apiKey: API_KEY,
            apiSecret: API_SECRET,
            meetingNumber: parseInt(document.getElementById('meeting_number').value),
            userName: document.getElementById('display_name').value,
            passWord: "",
            leaveUrl: "https://zoom.us",
            role: 1
        };


        var signature = ZoomMtg.generateSignature({
            meetingNumber: meetConfig.meetingNumber,
            apiKey: meetConfig.apiKey,
            apiSecret: meetConfig.apiSecret,
            role: meetConfig.role,
            success: function(res){
                console.log(res.result);
            }
        });

        ZoomMtg.init({
            leaveUrl: 'http://www.zoom.us',
            isSupportAV: true,
            success: function () {
                ZoomMtg.join(
                    {
                        meetingNumber: meetConfig.meetingNumber,
                        userName: meetConfig.userName,
                        signature: signature,
                        apiKey: meetConfig.apiKey,
                        userEmail: 'email@gmail.com',
                        passWord: meetConfig.passWord,
                        success: function(res){
                            $('#nav-tool').hide();
                            console.log('join meeting success');
                        },
                        error: function(res) {
                            console.log(res);
                        }
                    }
                );
            },
            error: function(res) {
                console.log(res);
            }
        });

    });

})();

Hey @abdelazizwaheed11,

What is the meeting number you are using? It must be a valid Zoom meeting number.

Can you try generating your signature from here instead:

Let me know if that works!

Thanks,
Tommy

@tommy i took Meeting not started!
as my reference,
can i create a zoom meeting using the sdk only .

Hey @abdelazizwaheed11,

What is the meetingID you are using?

You can’t create a meeting using the SDK, you can using the API.

You can however use your personal meeting number.

Try using your PMI.

Thanks,
Tommy