With the JWT app type being deprecated soon, what is the right approach to generate the Web SDK Signature with an ASP.NET Core (C#) backend? Looking at the link below, it appears the example is using JWT.
Thanks, but I just want to confirm with Zoom Support that the JWT token signature generation method is still valid after June 2023.
Hi @donte.zoom , I met you during Zoomtopia and had an extensive talk on this topic. Are you able to confirm that using JWT token to generate signature will still be valid after June 2023? Thanks.
Thanks for the tags! I hope you are doing well and had a great long weekend. To answer your question, yes JWT token signature generation will be deprecated in June 2023.
JThe JWT app type (deprecated in June 2023. )
You should instead generate SDK JWT token signature with the Meeting SDK Marketplace app type. Here is our documentation on this topic:
Meeting SDK Marketplace app typ
You may also be interested in checking our JWT migration support articles:
JWT App Type Deprecation FAQ
JWT app type migration guide
Let me know if this helps to clarify or if you have any additional questions.
Great question! I believe you just need to create a function that handles creating the SDK JWT and endpoint that will return the token. The endpoint should be a POST and take the meeting number and role.
Let me know if I missing anything. If so, can you share more details regarding your current implementation? This will help provide more context on what needs to be changed. In the meantime, I did some googling and found some helpful resources on generating JWT tokens.
Thank you for the reply. Our implementation is straightforward - we use asp.net core 6 in our backend and plain JavaScript and HTML/CSS for our front end. We will be using the Zoom Web SDK and want to generate the signature from the backend using the api key and secret and pass the signature to the front end to start the meeting.
Okay, @donte.zoom I think I see what you have here is for Node.js. That is fine because we have an app using Node.js and there is a GitHub example repo, but for our other app, which is asp.net Core MVC, again, we just want to confirm that this method will still work after 2023 since it is using jwt token, as long as we swap out the API Key and Secret using the SDK Key and Secret?
Unfortunately, I did a test using the Meeting SDK Web Sample and got an invalid signature error. I entered the signature to jwt.io and it was an invalid signature.
Did some testing on my side with C# and I can confirm the following script works as expected with the Web SDK.
using System;
using System.Collections.Generic;
using System.Text;
using Jose;
public class ZoomHelper
{
static readonly string sdkKey = "ENTTER YOUR SDK KEY";
static readonly string sdkSecret = "ENTTER YOUR SDK Secret";
static readonly int roleId = 1; // 0 for participant, 1 for host
private static long ToEpoch(DateTime value) => (value.Ticks - 621355968000000000) / (10000 * 1000);
public static string GetSignature(long meetingNumber)
{
var now = DateTime.UtcNow;
var iat = ToEpoch(now);
var exp = ToEpoch(now.AddDays(1));
var payload = new Dictionary<string, object>()
{
{ "appKey", sdkKey },
{ "sdkKey", sdkKey },
{ "mn", meetingNumber },
{ "role", roleId },
{ "iat", iat },
{ "exp", exp },
{ "tokenExp", exp },
};
return Jose.JWT.Encode(payload, Encoding.UTF8.GetBytes(sdkSecret), JwsAlgorithm.HS256);
}
}
For context, I grab the code snippet from the link below and generated it using a simple C# console app with VScode. :
That aside, I am working on what will either be a demo app or blog on generating the Web SDK Signature with an ASP.NET Core (C#) backend. Still getting familiar with C# so I will need a little time. In the meantime, feel free to tag me here for updates on that project.