Description
I have a Windows application (.Net 4.8 / C#) that integrates with the Zoom Meeting SDK.
I am able to generate the JWT token after creating the app on the Marketplace and my application initializes the SDK successfully.
- GetAuthServiceWrap().SDKAuth returns SDKERR_SUCCESS
However, the authentication callback (GetAuthServiceWrap().Add_CB_onAuthenticationReturn() ) does not return AUTHRET_SUCCESS, it retuns AUTHRET_UNKNOWN.
I have tried to capture the last Zoom error - but I do not find GetZoomLastError() in the C# wrapper.
I am unable to Join (or Start) a meeting.
Which Windows Meeting SDK version?
v5.16.1.22573
To Reproduce
Steps to reproduce the behavior:
-
Initialize the SDK
ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.Initialize() -
Wire the authentication callback:
GetAuthServiceWrap().Add_CB_onAuthenticationReturn([callback delegate goes here]) -
Use the Client ID and Client Secret from the app registration in the Marketplace to generate the JWT token:
string zoomClientID = "[ client id goes here]";
string zoomClientSecret = "[ client secret goes here]";
int secondsSinceEpoch = (int)DateTimeOffset.Now.ToUnixTimeSeconds();
int secondsToExpire = secondsSinceEpoch + 86400; // default to 24 hours: cannot be more than 48 hrs.
var payload = new Dictionary<string, object>();
payload.Add("appKey", zoomClientID);
payload.Add("iat", secondsSinceEpoch);
payload.Add("exp", secondsToExpire);
payload.Add("tokenExp", secondsToExpire);
string jwt_value = Jwt.JsonWebToken.Encode(payload, zoomClientSecret, Jwt.JwtHashAlgorithm.HS256);
- Authenticate the SDK
ZOOM_SDK_DOTNET_WRAP.AuthContext param = new ZOOM_SDK_DOTNET_WRAP.AuthContext
{
jwt_token = [ jwt token goes here ]
};
status = zoom_instance.GetAuthServiceWrap().SDKAuth(param);
*Observe that ‘status’ = SDKERR_SUCCESS
- Handle the authentication callback
bool result == ZOOM_SDK_DOTNET_WRAP.AuthResult.AUTHRET_SUCCESS
- Observe that ‘result’ = AUTHRET_UNKNOWN
Context
This app is for private use only, not published in the Marketplace.
I suspect I am missing the API_User ZAK, but I’m not clear on how to get it.
When I try calling ‘get /users/{userId}/token’ using the JWT token I get back “Invalid access token”.
Which is weird as that same token just authenticated successfully.