Zoom Meeting SDK issue with Auth (Oauth Server to Server App)

Meeting SDK Type and Version
Meeting SDK Windows + C# Wrapper 5.14.5.15340

Description
Hi, I have some trouble to authenticate with the Windows Meeting SDK (C# Wrapper).

I have 2 main issues:

  1. Sometime, the CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onAuthenticationReturn callback is not actually called and I have no idea why. I activated the log and there is nothing in it.

  2. When the callback work, I always receive an error code 11 who is not documented and not part of the enum AuthResult.

Here is the code:

private void ButtonAuth_Click( object sender, RoutedEventArgs e )
{
  //register callback
  CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onAuthenticationReturn( OnAuthenticationReturn );
  CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onLoginRet( OnLoginRet );
  CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onLogout( OnLogout );

  AuthContext authContext = new AuthContext { jwt_token = GenerateJwtToken() };
  CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth( authContext );
  Hide();
}

private static string GenerateJwtToken()
{
  long iat = (int)( DateTime.Now - new DateTime( 1970, 1, 1 ) ).TotalSeconds;
  long exp = iat + 60 * 60 * 24; // 24 hours
  long tokenExp = exp;

  string payload = JsonSerializer.Serialize(
    new
    {
      appKey = "OAuth Server to Server App Client ID", 
      iat,
      exp,
      tokenExp
    } );

  string token = JWT.Encode(
    $"{payload}",
    Encoding.ASCII.GetBytes( "OAuth Server to Server App Client Secret" ), 
    JwsAlgorithm.HS256 );

  return token;
}

@dlachance ,

Sorry for not getting back to you sooner. We sincerely apologize for any inconvenience caused. We wanted to reach out and see if the issue you mentioned is still persisting. Rest assured, we are more than happy to lend a hand in diagnosing, troubleshooting, and finding a solution for you. We understand how frustrating technical issues can be, and we’re here to support you every step of the way. Please don’t hesitate to let us know if there’s anything else we can do to assist you. We’re committed to providing the best possible assistance and ensuring your satisfaction.

Thank you for your patience, and we look forward to hearing from you!