# Cannot authorize using jwt

**URL:** <https://devforum.zoom.us/t/cannot-authorize-using-jwt/25829>\
**Category:** Meeting SDK\
**Created:** [July 31, 2020, 9:23am UTC](https://devforum.zoom.us/t/cannot-authorize-using-jwt/25829 "2020-07-31T09:23:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamhodovanets](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/adamhodovanets/32/12814_2.png) [@adamhodovanets](https://devforum.zoom.us/u/adamhodovanets)\
**Post date:** [July 31, 2020, 9:23am UTC](https://devforum.zoom.us/t/cannot-authorize-using-jwt/25829/1 "2020-07-31T09:23:41Z")

</div>

Using the sample project, I can’t authorize sdkError 15 after jwt check

```
public void onAuthenticationReturn(AuthResult ret)
{
    if (ZOOM_SDK_DOTNET_WRAP.AuthResult.AUTHRET_SUCCESS == ret)
    {
        start_meeting_wnd.Show();
    }
    else//error handle.todo
    {
        Show();
    }
}
public void onLoginRet(LOGINSTATUS ret, IAccountInfo pAccountInfo)
{
    //todo
}
public void onLogout()
{
    //todo
}
private void button_auth_Click(object sender, RoutedEventArgs e)
{
    //register callback
    ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onAuthenticationReturn(onAuthenticationReturn);
    ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onLoginRet(onLoginRet);
    ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onLogout(onLogout);

    var tokenHandler = new System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler();
    var now = DateTime.UtcNow;
    var apiSecret = " ****";
    byte[] symmetricKey = Encoding.ASCII.GetBytes(apiSecret);

    var tokenDescriptor = new SecurityTokenDescriptor
    {
        Issuer = " ****",
        Expires = now.AddSeconds(30),
        SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(symmetricKey), SecurityAlgorithms.HmacSha256),
    };
    var token = tokenHandler.CreateToken(tokenDescriptor);

    var tokenString = tokenHandler.WriteToken(token);

    ZOOM_SDK_DOTNET_WRAP.AuthContext param = new ZOOM_SDK_DOTNET_WRAP.AuthContext();
    param.jwt_token = tokenString;
    var sdkError = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(param);
    MessageBox.Show(sdkError.ToString());
    Hide();
}

void Wnd_Closing(object sender, CancelEventArgs e)
{
    System.Windows.Application.Current.Shutdown();
}
```

---

<div class="post-metadata">

**Author:** ![john.zou](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/john.zou/32/12649_2.png) [@john.zou](https://devforum.zoom.us/u/john.zou)\
**Post date:** [July 31, 2020, 1:35pm UTC](https://devforum.zoom.us/t/cannot-authorize-using-jwt/25829/2 "2020-07-31T13:35:18Z")

</div>

It seems to be because of this : [C# wrapper demo callback](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284)

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 1, 2020, 4:36am UTC](https://devforum.zoom.us/t/cannot-authorize-using-jwt/25829/3 "2020-08-01T04:36:53Z")

</div>

Hi @adamhodovanets,

Thanks for the post. Please refer to the answer here: [C# wrapper demo callback](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/3) and see if it helps.

Thanks!
