# Creating Signature Server side with C#

**URL:** <https://devforum.zoom.us/t/creating-signature-server-side-with-c/54737>\
**Category:** Web\
**Created:** [July 26, 2021, 2:28pm UTC](https://devforum.zoom.us/t/creating-signature-server-side-with-c/54737 "2021-07-26T14:28:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dataonedigital](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dataonedigital/32/17706_2.png) [@dataonedigital](https://devforum.zoom.us/u/dataonedigital)\
**Post date:** [July 26, 2021, 2:28pm UTC](https://devforum.zoom.us/t/creating-signature-server-side-with-c/54737/1 "2021-07-26T14:28:15Z")

</div>

I’m trying to generate my signature on my server with C#. I have everything else working and running smoothly when run on the client but cant get it to work when i switch it over to run on C#.

1. errorCode: 200
2. reason: “Verify JWT failed”
3. type: "JOIN\_MEETING\_FAILED

Video SDK version 1.1.3  
On Angular 12 & C# .Net Core 3.1

What I have so far

public string GenerateSignature(string topic=“Default Topic”)  
{  
var signature = string.Empty;

```
        var iat = Math.Round(GetTime()/ 1000);
        var exp = iat + 7200;

        var appSettingsJson = AppSettingsJson.GetAppSettings();
        var sdkKey = appSettingsJson["Data:ZoomInfo:SdkKey"];
        var sdkSecret = appSettingsJson["Data:ZoomInfo:SdkSecret"];

        var claims = new List<Claim>
            {
                new Claim("app_key", sdkKey),
                new Claim("iat", iat.ToString(CultureInfo.InvariantCulture)),
                new Claim("exp", exp.ToString(CultureInfo.InvariantCulture)),
                new Claim("tpc", topic),
                new Claim("pwd", string.Empty)
            };

        var encoding = new ASCIIEncoding();
        byte[] keyByte = encoding.GetBytes(sdkSecret);
        var securityKey = new SymmetricSecurityKey(keyByte);
        var credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256);

        var secToken = new JwtSecurityToken(
               sdkKey,
               null,
               claims,
               DateTime.UtcNow,
               DateTime.UtcNow.AddHours(10),
               credentials);

        var handler = new JwtSecurityTokenHandler();
        signature = handler.WriteToken(secToken);

        return signature;
    }

```

Any help on this or examples would be much appreciated

---

<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:** [August 2, 2021, 7:40pm UTC](https://devforum.zoom.us/t/creating-signature-server-side-with-c/54737/2 "2021-08-02T19:40:34Z")

</div>

Hey @dataonedigital ,

We do not have any examples of [generating Video SDK signatures](https://marketplace.zoom.us/docs/sdk/video/web/build/signature) in C# yet.

That being said, if you send your signature and a link to this thread to [developersupport@zoom.us](mailto:developersupport@zoom.us) we will help you debug your signature. 🙂

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:** [September 2, 2021, 5:41am UTC](https://devforum.zoom.us/t/creating-signature-server-side-with-c/54737/3 "2021-09-02T05:41:19Z")

</div>

Closed on September 2, 2021, 5:41am UTC

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