# Zoom-sdk works locally, but not when deployed

**URL:** <https://devforum.zoom.us/t/zoom-sdk-works-locally-but-not-when-deployed/43763>\
**Category:** Web\
**Created:** [February 19, 2021, 10:21am UTC](https://devforum.zoom.us/t/zoom-sdk-works-locally-but-not-when-deployed/43763 "2021-02-19T10:21:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timfuhrmann](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/timfuhrmann/32/22980_2.png) [@timfuhrmann](https://devforum.zoom.us/u/timfuhrmann)\
**Post date:** [February 19, 2021, 10:21am UTC](https://devforum.zoom.us/t/zoom-sdk-works-locally-but-not-when-deployed/43763/1 "2021-02-19T10:21:36Z")

</div>

I use zoom’s api, jwt and the websdk to create a meeting on button click, then join as a host and simultaneously start the meeting enabling others to join. This works fine locally, but somehow when deployed to cloudflare I get the following error:

> Your connection has timed out and you cannot join the meeting. Verify your network connectivity and try again.

**Error object:**

```auto
errorCode: 3706
errorMessage: undefined
method: "join"
result: "The meeting number is wrong."
status: false

```

“The meeting number is wrong” is the wrong message here, since the meeting number provided comes from zoom’s api directly and is working locally. Additionally I checked my scheduled meetings created by the Zoom API, using zoom’s web interface, and I found the IDs/meeting numbers to be matching.

```auto
const joinMeeting = async (meetConfig: MeetConfigData) => {
    const ZoomMtg = require("@zoomus/websdk").ZoomMtg;
    ZoomMtg.setZoomJSLib("https://source.zoom.us/1.9.0/lib", "/av");
    ZoomMtg.preLoadWasm();
    ZoomMtg.prepareJssdk();

    const signature = await generateSignature(meetConfig.role, meetConfig.meetingNumber);

    ZoomMtg.init({
        leaveUrl: meetConfig.leaveUrl,
        isSupportAV: true,
        success: () => {
            ZoomMtg.join({
                signature,
                apiKey: "API_KEY",
                meetingNumber: meetConfig.meetingNumber,
                userName: meetConfig.userName,
                passWord: meetConfig.password,
                success: () => {
                    console.log("Successfully hosted or joined meeting.");
                },
                error: (err: Error) => {
                    console.log("Error: ", err);
                },
            });
        },
        error: (err: Error) => {
            console.log("Error: ", err);
        },
    });
};

```

Serverside signature method, which returns I assume the correct signature, since it works locally and logging signature right before the join method returns a proper signature string as well:

```auto
export const createSignature = ({ role, meetingNumber }) => {
    const timestamp = new Date().getTime() - 30000;
    const msg = Buffer.from(
        process.env.NEXT_PUBLIC_ZOOM_API_KEY + meetingNumber + timestamp + role
    ).toString("base64");
    const hash = crypto
        .createHmac("sha256", process.env.NEXT_PUBLIC_ZOOM_API_SECRET)
        .update(msg)
        .digest("base64");

    return Buffer.from(
        `${process.env.NEXT_PUBLIC_ZOOM_API_KEY}.${meetingNumber}.${timestamp}.${role}.${hash}`
    ).toString("base64");
};

```

Has anyone ever experienced this?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [February 22, 2021, 5:38pm UTC](https://devforum.zoom.us/t/zoom-sdk-works-locally-but-not-when-deployed/43763/2 "2021-02-22T17:38:54Z")

</div>

Hey @timfuhrmann ,

You seem to have everything configured correctly, but my guess is that the meeting number is somehow hard coded on your production environment.

Can you share your [Web SDK signature](https://marketplace.zoom.us/docs/sdk/native-sdks/web/build/signature) for a test meeting to [developersupport@zoom.us](mailto:developersupport@zoom.us) with the issue so I can help debug? 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [March 25, 2021, 3:39am UTC](https://devforum.zoom.us/t/zoom-sdk-works-locally-but-not-when-deployed/43763/3 "2021-03-25T03:39:46Z")

</div>

Closed on March 25, 2021, 3:39am UTC

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