# How to generate signature for OAuth app type

**URL:** <https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908>\
**Category:** Web\
**Created:** [April 3, 2023, 11:22am UTC](https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908 "2023-04-03T11:22:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbudzyn](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pbudzyn](https://devforum.zoom.us/u/pbudzyn)\
**Post date:** [April 3, 2023, 11:22am UTC](https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908/1 "2023-04-03T11:22:55Z")

</div>

**Description**  
I cannot join the meeting using Web SDK & Oauth app(ClientId, ClientSecret)  
Error I receive : {method: ‘join’, status: false, result: ‘Invalid signature.’, errorMessage: ‘Signature is invalid.’, errorCode: 3712}

**Browser Console Error**  
{method: ‘join’, status: false, result: ‘Invalid signature.’, errorMessage: ‘Signature is invalid.’, errorCode: 3712}

**Which Web Meeting SDK version?**  
2.9.0

**Additional context**  
The way I am generating signature on the backend :

```
    private static string GenerateZoomSignatureForNewApps(string key, string secret, string meetingNumber, string role)
    {
        var header = new
        {
            alg = "HS256",
            typ = "JWT"
        };
        var headerBytes = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(header));
        var base64UrlHeader = Base64UrlEncode(headerBytes);

        var iat = (long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds - 400;
        var expirationSecondsToAdd = 7200;
        var exp = iat + expirationSecondsToAdd;

        var payload = new
        {
            appKey = key,
            sdkKey = key,
            mn = meetingNumber,
            role = role,
            iat = iat,
            exp = exp,
            tokenExp = exp
        };

        var jsonPayload = JsonConvert.SerializeObject(payload);
        var payloadBytes = Encoding.UTF8.GetBytes(jsonPayload);
        var base64UrlPayload = Base64UrlEncode(payloadBytes);

        var message = $"{base64UrlHeader}.{base64UrlPayload}";
        var keyBytes = Encoding.UTF8.GetBytes(secret);

        using var hmacsha256 = new HMACSHA256(keyBytes);
        var signatureBytes = hmacsha256.ComputeHash(Encoding.UTF8.GetBytes(message));
        var signature = Base64UrlEncode(signatureBytes);

        return signature;

        static string Base64UrlEncode(byte[] input)
        {
            string base64 = Convert.ToBase64String(input);
            return base64.Replace("+", "-").Replace("/", "_").TrimEnd('=');
        }
    }

```

frontend:

```
                        ZoomMtg.join(
                            {
                                meetingNumber: data.meetingNumber,
                                userName: data.userName,
                                signature: data.signature,
                                sdkKey: data.clientId,
                                userEmail: data.userEmail,
                                passWord: data.passWord,
                                success: function (res) {

```

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [April 3, 2023, 6:07pm UTC](https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908/2 "2023-04-03T18:07:21Z")

</div>

@pbudzyn,

Thank you for posting in the Zoom Developer Forum. To begin, please share which Marketplace type App you are using to authenticate the Meeting SDK. You should be using the Meeting SDK Marketplace-type App, here is our help documentation o that :

# Create a Meeting SDK App

> **[Create a Meeting SDK app](https://developers.zoom.us/docs/meeting-sdk/create/)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

# Authorization

> **[Meeting SDK Auth](https://developers.zoom.us/docs/meeting-sdk/auth/)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

---

<div class="post-metadata">

**Author:** ![pbudzyn](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pbudzyn](https://devforum.zoom.us/u/pbudzyn)\
**Post date:** [April 4, 2023, 11:54am UTC](https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908/3 "2023-04-04T11:54:14Z")

</div>

I have created OAuth app in the marketplace.  
Should I also create the Meeting SDK app to be able to join the meetings?

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [April 4, 2023, 6:24pm UTC](https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908/4 "2023-04-04T18:24:25Z")

</div>

@pbudzyn,

Yes, to authorize the SDK you need to create a Meeting SDK Marketplace app.

---

<div class="post-metadata">

**Author:** ![pbudzyn](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pbudzyn](https://devforum.zoom.us/u/pbudzyn)\
**Post date:** [April 7, 2023, 11:34am UTC](https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908/5 "2023-04-07T11:34:14Z")

</div>

@donte.zoom Thanks, I have managed to join the meeting!  
I have another problem now when the second participant joins the meeting Zoom Client freezes because [https://source.zoom.us/2.11.0/lib/av/vb-resources/tf.min.js](https://source.zoom.us/2.11.0/lib/av/vb-resources/tf.min.js) cannot be loaded. It is in a pending state for the second participant. Do you know what could be the reason?

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [April 7, 2023, 11:47am UTC](https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908/6 "2023-04-07T11:47:12Z")

</div>

@pbudzyn ,

Glad to you are able to join the meeting. Regarding the second matter, can you share a screenshot of browser’s console? Also, please share a screenshot of the network tab when the user tries to join.

---

<div class="post-metadata">

**Author:** ![pbudzyn](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pbudzyn](https://devforum.zoom.us/u/pbudzyn)\
**Post date:** [April 7, 2023, 12:04pm UTC](https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908/7 "2023-04-07T12:04:15Z")

</div>

@donte.zoom

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/3/d387970abd51ec762ddec6cb1fdad80636e0c7e1.png)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/d/ed30581aea1d75e8cc9d81f7e67ce71fd459dd57.png)

I have compared requests and the only difference between the first and second user is this tf.min.js request

---

<div class="post-metadata">

**Author:** ![pbudzyn](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pbudzyn](https://devforum.zoom.us/u/pbudzyn)\
**Post date:** [April 7, 2023, 2:02pm UTC](https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908/8 "2023-04-07T14:02:24Z")

</div>

Maybe the problem is not in this file, but this file is not loaded because the tab freezes and Chrome consumes more and more memory every second

---

<div class="post-metadata">

**Author:** ![pbudzyn](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pbudzyn](https://devforum.zoom.us/u/pbudzyn)\
**Post date:** [April 7, 2023, 2:30pm UTC](https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908/9 "2023-04-07T14:30:35Z")

</div>

One more screenshot

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/7/275ef0fa8a95b31bb2584b994846726f65f50e92.png)

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [April 11, 2023, 1:30pm UTC](https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908/11 "2023-04-11T13:30:43Z")

</div>

@pbudzyn,

Are you still seeing the same behavior or has it resolved?

---

<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:** [May 26, 2023, 6:52am UTC](https://devforum.zoom.us/t/how-to-generate-signature-for-oauth-app-type/85908/13 "2023-05-26T06:52:20Z")

</div>

Closed on May 26, 2023, 6:52am UTC

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