# Joining failure

**URL:** <https://devforum.zoom.us/t/joining-failure/20728>\
**Category:** Web\
**Created:** [June 9, 2020, 2:47am UTC](https://devforum.zoom.us/t/joining-failure/20728 "2020-06-09T02:47:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ser.shivam1994](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ser.shivam1994/32/925_2.png) [@ser.shivam1994](https://devforum.zoom.us/u/ser.shivam1994)\
**Post date:** [June 9, 2020, 2:47am UTC](https://devforum.zoom.us/t/joining-failure/20728/1 "2020-06-09T02:47:01Z")

</div>

**Description**  
I am facing a joining failure problem. some user able to join the meeting after that showing joining fail

**Error**  
joining fail

**Which version?**  
I am using the latest version([https://github.com/zoom/sample-app-web](https://github.com/zoom/sample-app-web))

**To Reproduce(If applicable)**

**Screenshots**  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/3/3daa2c912aef3544341f983a0b8c417447670042.png)

**Smartphone (please complete the following information):**

- Browser:[e.g. Chrome]

**Additional context**

---

<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:** [June 12, 2020, 9:01pm UTC](https://devforum.zoom.us/t/joining-failure/20728/2 "2020-06-12T21:01:56Z")

</div>

Hey @ser.shivam1994,

Please make sure you allow some time for the Web SDK files to load:

> [@Uncaught ReferenceError: localJsonpCallback is not defined using zoom web sdk](https://devforum.zoom.us/t/uncaught-referenceerror-localjsonpcallback-is-not-defined-using-zoom-web-sdk/20640/2):
>
> Hey @rahul4, Make sure you allow time for the [Web SDK files](https://marketplace.zoom.us/docs/sdk/native-sdks/web/getting-started/integrate) to load before joining a meeting. ZoomMtg.preLoadWasm(); ZoomMtg.prepareJssdk(); You can check the network tab to see if you are joining the meeting before the Web Assembly files have loaded. Thanks, Tommy

If you are still seeing this issue, please provide steps to reproduce the issue.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![rschoenfeld](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rschoenfeld/32/9018_2.png) [@rschoenfeld](https://devforum.zoom.us/u/rschoenfeld)\
**Post date:** [June 12, 2020, 9:24pm UTC](https://devforum.zoom.us/t/joining-failure/20728/3 "2020-06-12T21:24:26Z")

</div>

I am seeing the exact same thing. The error actually goes away if you set the role to host instead of attendee in the SDK call. Unfortunately, we need attendee role.

---

<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:** [June 17, 2020, 7:48pm UTC](https://devforum.zoom.us/t/joining-failure/20728/4 "2020-06-17T19:48:52Z")

</div>

Hey @rschoenfeld,

That is strange, it should work with attendee role 0. Can you please provide steps to reproduce the issue? It is working as expected when I test.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![rschoenfeld](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rschoenfeld/32/9018_2.png) [@rschoenfeld](https://devforum.zoom.us/u/rschoenfeld)\
**Post date:** [June 17, 2020, 8:11pm UTC](https://devforum.zoom.us/t/joining-failure/20728/5 "2020-06-17T20:11:17Z")

</div>

I will reach out to my developer for the specific information. Can you provide your steps? Do you have code that we can try where you see it working? I really don’t want to share API credential info in a public forum.

---

<div class="post-metadata">

**Author:** ![bkmak](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bkmak/32/10651_2.png) [@bkmak](https://devforum.zoom.us/u/bkmak)\
**Post date:** [June 17, 2020, 9:46pm UTC](https://devforum.zoom.us/t/joining-failure/20728/6 "2020-06-17T21:46:06Z")

</div>

This is the code we are using. I have purposely used placeholders for the meeting password, API Key userName, userEmail and signature for privacy. If needed, we can provide you with this information off-forum.

```
<!-- import ZoomMtg dependencies -->
<script src="https://source.zoom.us/1.7.8/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/jquery.min.js"></script>
<script src="https://source.zoom.us/1.7.8/lib/vendor/lodash.min.js"></script>

<!-- import ZoomMtg -->
<script src="https://source.zoom.us/zoom-meeting-1.7.8.min.js"></script>

<script>
    $(document).ready(function () {
        ZoomMtg.setZoomJSLib('https://source.zoom.us/1.7.8/lib', '/av');
        ZoomMtg.prepareJssdk();
        ZoomMtg.preLoadWasm();
        
        ZoomMtg.init({
            debug: true, //optional
            leaveUrl: 'https://zoom.us', //required
            showMeetingHeader: false, //option
            disableInvite: true, //optional
            disableCallOut: false, //optional
            disableRecord: true, //optional
            disableJoinAudio: false, //optional
            audioPanelAlwaysOpen: false, //optional
            showPureSharingContent: false, //optional
            isSupportAV: true, //optional,
            isSupportChat: true, //optional,
            isSupportQA: true, //optional,
            isSupportCC: true, //optional,
            screenShare: false, //optional,
            rwcBackup: '', //optional,
            videoDrag: true, //optional,
            sharingMode: 'fit', //optional,
            videoHeader: false, //optional,
            isLockBottom: false, // optional,
            isSupportNonverbal: true, // optional,
            isShowJoiningErrorDialog: true, // optional,
            loginWindow: { // optional,
              width: 400,
              height: 380
            },
            success: function () {
                ZoomMtg.join({
                    meetingNumber: *********** ,
                    passWord: 'passWord',
                    userName: 'Test',
                    userEmail: 'test@test.com',
                    apiKey: 'api_key',
                    signature: 'signature',
                    success: function (res) {
                    },
                    error: function(res){console.log(res)}
                });
            },
            error: function (res) {
                console.log(reg);
            }
        });
    });
</script>

```

\*This post has been edited to remove any meeting / webinar IDs

---

<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:** [June 18, 2020, 11:43pm UTC](https://devforum.zoom.us/t/joining-failure/20728/7 "2020-06-18T23:43:11Z")

</div>

Hey @rschoenfeld, @bkmak,

Thanks for sharing this, can you also share how you are generating the [signature](https://marketplace.zoom.us/docs/sdk/native-sdks/web/essential/signature)?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![bkmak](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bkmak/32/10651_2.png) [@bkmak](https://devforum.zoom.us/u/bkmak)\
**Post date:** [June 19, 2020, 3:46am UTC](https://devforum.zoom.us/t/joining-failure/20728/8 "2020-06-19T03:46:50Z")

</div>

@tommy,

Below is the server-side code we use to generate the signature. Note that if we change the role variable from “0” to “1”, we are able to join the meeting as the host. It is only when the role is “0” that we receive the “Joining fail” error. This is what we see in the browser console:

{method: “join”, status: false, result: null, errorMessage: “Joining fail”, errorCode: 1}

```
    public string GetSignature()
    {
        string apiKey = "api_key";
        string apiSecret = "api_secret";
        string meetingNumber = " ***********";
        string ts = (ToTimestamp(DateTime.UtcNow.ToUniversalTime()) - 30000).ToString();
        string role = "0";
        string token = GenerateToken(apiKey, apiSecret, meetingNumber, ts, role);
        return token;
    }

    private static long ToTimestamp(DateTime value)
    {
        long epoch = (value.Ticks - 621355968000000000) / 10000;
        return epoch;
    }	

    private static string GenerateToken(string apiKey, string apiSecret, string meetingNumber, string ts, string role)
    {
        string message = String.Format("{0}{1}{2}{3}", apiKey, meetingNumber, ts, role);
        apiSecret = apiSecret ?? "";
        var encoding = new System.Text.ASCIIEncoding();
        byte[] keyByte = encoding.GetBytes(apiSecret);
        byte[] messageBytesTest = encoding.GetBytes(message);
        string msgHashPreHmac = System.Convert.ToBase64String(messageBytesTest);
        byte[] messageBytes = encoding.GetBytes(msgHashPreHmac);
        using (var hmacsha256 = new HMACSHA256(keyByte))
        {
            byte[] hashmessage = hmacsha256.ComputeHash(messageBytes);
            string msgHash = System.Convert.ToBase64String(hashmessage);
            string token = String.Format("{0}.{1}.{2}.{3}.{4}", apiKey, meetingNumber, ts, role, msgHash);
            var tokenBytes = System.Text.Encoding.UTF8.GetBytes(token);
            return System.Convert.ToBase64String(tokenBytes).TrimEnd(_padding);
        }
    }

```

\*This post has been edited to remove any meeting / webinar IDs

---

<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:** [June 22, 2020, 8:43pm UTC](https://devforum.zoom.us/t/joining-failure/20728/9 "2020-06-22T20:43:48Z")

</div>

Thanks @bkmak,

It looks like the reason users could not join your meeting was because you were requiring registration.

Currently the Web SDK does not support [Meeting Registration](https://support.zoom.us/hc/en-us/articles/211579443-Registration-for-Meetings).

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 10:22pm UTC](https://devforum.zoom.us/t/joining-failure/20728/10 "2020-08-21T22:22:59Z")

</div>


