ZOOM Web SDK JOIN_MEETING_FAILED errorCode=3712

Description
When I use the Zoom Web SDK to join the meeting, an error errorCode=3712 is reported. I checked the code for generating the signature, and there seems right. thanks.

Browser Console Error
{type: ‘JOIN_MEETING_FAILED’, reason: ‘Signature is invalid.’, errorCode: 3712}

Which Web Meeting SDK version?
2.5.0

Meeting SDK Code Snippets

public String generateSignature(String apiKey, String apiSecret, String meetingNumber, Integer role) {
        try {
            Mac hasher = Mac.getInstance("HmacSHA256");
            String ts = Long.toString(System.currentTimeMillis() - 30000);
            String msg = String.format("%s%s%s%d", apiKey, meetingNumber, ts, role);
            hasher.init(new SecretKeySpec(apiSecret.getBytes(), "HmacSHA256"));
            String message = Base64.getEncoder().encodeToString(msg.getBytes());
            byte[] hash = hasher.doFinal(message.getBytes());
            String hashBase64Str = DatatypeConverter.printBase64Binary(hash);
            String tmpString = String.format("%s.%s.%s.%d.%s", apiKey, meetingNumber, ts, role, hashBase64Str);
            String encodedString = Base64.getEncoder().encodeToString(tmpString.getBytes());
            return encodedString.replaceAll("\\=+$", "");
        }
        catch (NoSuchAlgorithmException e) {}
        catch (InvalidKeyException e) {}
        return "";
    }

    @Test
    public void testSignature() {
        String signature = this.generateSignature("zp1yfDk-RPufHFAgbbc95w", "BqJw1aBnPhoDbBctQWChUlFwXqCWKirK0jEX", "83137961703", 0);
        System.out.println(signature);
    }
    const client = ZoomMtgEmbedded.createClient()
    let meetingSDKElement = document.getElementById('meetingSDKElement')
    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')
                        }
                    }
                ]
            }
        }
    })
    client.join({
        sdkKey: 'zp1yfDk-RPufHFAgbbc95w',
        signature: 'enAxeWZEay1SUHVmSEZBZ2JiYzk1dy44MzEzNzk2MTcwMy4xNjU4OTc3MjY4NjkyLjAuWnZKUGpZRGV0eUxKajBHcVFOVGRIVEJxSzNIb2Qrd0dqT3VzZGFKekVqQT0',
        meetingNumber: '83137961703',
        password: 'H1d4UY',
        userName: 'user'
    })

Device (please complete the following information):

  • Device: macbook pro
  • OS: macOS 12.4
  • Browser: Chrome
  • Browser Version :103.0.5060.134

Greeting and Welcome @udty ,

Thank you for posting! Can you share which SDK you are using? As a first step, I’d recommend performing an isolated test to identify the root cause. To do so, you can use our sample signature app to generate the meeting signature and then manually enter the signature in the join function.

public String generateSignature(String apiKey, String apiSecret, String meetingNumber

→ creates a JWT Signature (deprecated)

    client.join({
        sdkKey: 'zp1yfDk-RPufHFAgbbc95w',
        signature: ... ,

→ join with SDK JWT Signature (sdkKey)

two different apps, both works but not mixed

you can easily distinguish the signature routines:

  • JWT Signature (deprecated) → time in Milliseconds
  • SDK JWT Signature → time in Seconds

Jürgen

1 Like

thanks, you solved my problem

1 Like