Description
When running CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(param) with an AuthContext param, returns SDKError 15, which doesn’t have a value in the Enum so I’m unsure on the error.
Which version?
5.2.41727.0928
To Reproduce(If applicable)
Run the following code:
AuthContext param = new AuthContext();
param.jwt_token = "JWT TOKEN HERE";
SDKError err = CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(param);
if (err != SDKError.SDKERR_SUCCESS)
{
MessageBox.Show("There was an error authorising with Zoom:" + err.ToString());
}
Screenshots
N/A
Additional context
Authorising with an AuthParam and appKey/appSecret works fine.
Thanks for getting back to me. I’d seen that Python snippet on another thread and tried to do that with Microsoft.IdentityModel.Tokens and the following code:
Dim appKey As String = "Key"
Dim appSecret As String = "Secret"
Dim iat As Long = DateTimeOffset.UtcNow.ToUnixTimeSeconds
Dim exp As Long = iat + 60 * 60
Dim securityKey As New SymmetricSecurityKey(Encoding.UTF8.GetBytes(appSecret))
Dim credentials As New SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256)
Dim header As New JwtHeader(credentials)
Dim payload As New JwtPayload()
payload.AddClaim(New Claim("appKey", appKey))
payload.AddClaim(New Claim("iat", iat))
payload.AddClaim(New Claim("exp", exp))
payload.AddClaim(New Claim("tokenExp", exp))
Dim secToken As New JwtSecurityToken(header, payload)
Dim handler As New JwtSecurityTokenHandler()
Dim token As String = handler.WriteToken(secToken)
However that’s the token that was causing SDKError 15. Can you noticed anything wrong with that?