# Problems with Windows C# SDK, Getting Authenticated

**URL:** <https://devforum.zoom.us/t/problems-with-windows-c-sdk-getting-authenticated/63486>\
**Category:** Windows\
**Created:** [January 31, 2022, 2:55pm UTC](https://devforum.zoom.us/t/problems-with-windows-c-sdk-getting-authenticated/63486 "2022-01-31T14:55:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cjordan](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@cjordan](https://devforum.zoom.us/u/cjordan)\
**Post date:** [January 31, 2022, 2:55pm UTC](https://devforum.zoom.us/t/problems-with-windows-c-sdk-getting-authenticated/63486/1 "2022-01-31T14:55:19Z")

</div>

**Description**  
I can not get the callback to initiate for the Authentication request. I created the JWT several different ways including using the [JWT.io](http://JWT.io) suggested, but after making the following call

ZOOM\_SDK\_DOTNET\_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(param);

It just sit there and never initiates the call back. I have checked and rechecked the JWT token, but nothing seems to work.

**Which Windows Meeting SDK version?**  
zoom-c-sharp-wrapper-5.9.1.2625

**Device (please complete the following information):**

- Device: [e.g. Dell XPS 13]
- OS: [e.g. Windows 10]

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 31, 2022, 9:53pm UTC](https://devforum.zoom.us/t/problems-with-windows-c-sdk-getting-authenticated/63486/2 "2022-01-31T21:53:37Z")

</div>

Hi @cjordan, thanks for using the dev forum.

Can you please provide the following information?

- The return value of `SDKAuth`
- A code snippet showing how you are setting up your `IAuthServiceEvent` and passing it into the SDK
- Which callback you are not receiving
- The payload of your JWT (with your developer credentials removed)

Thanks!

---

<div class="post-metadata">

**Author:** ![cjordan](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@cjordan](https://devforum.zoom.us/u/cjordan)\
**Post date:** [January 31, 2022, 10:12pm UTC](https://devforum.zoom.us/t/problems-with-windows-c-sdk-getting-authenticated/63486/3 "2022-01-31T22:12:18Z")

</div>

Return of SDKAuth  
ZOOM\_SDK\_DOTNET\_WRAP.SDKError.SDKERR\_UNINITIALIZE

```auto
//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);

            ZOOM_SDK_DOTNET_WRAP.AuthContext param = new ZOOM_SDK_DOTNET_WRAP.AuthContext();
            param.jwt_token = JWTTokenTextBox.Text;
                        
            param.jwt_token = token;

            var x = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(param);

```

Payload

```auto
            var now = DateTime.UtcNow;
            var issDate = (int)(now - new DateTime(1970, 1, 1)).TotalSeconds;

            var securityKey = new Microsoft.IdentityModel.Tokens.SymmetricSecurityKey(Encoding.UTF8.GetBytes(apiSecret));

            var credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256);

            var header = new JwtHeader(credentials);

            var payload = new JwtPayload
            {
                {"appKey", apiKey },
                {"iat", issDate},
                {"exp", issDate + 3600 },
                {"tokenExp", issDate + 3600 }
            };

            var secToken = new JwtSecurityToken(header, payload);
            var handler = new JwtSecurityTokenHandler();

            var tokenString = handler.WriteToken(secToken);

```

I am not receiving the onAuthenticationReturn Event. I didn’t realize that the SDKAuth returned a value. Now that I see it is ZOOM\_SDK\_DOTNET\_WRAP.SDKError.SDKERR\_UNINITIALIZE, I am sure that is why I am not getting the call back, but why would I receive this value from the SDKAuth call?

---

<div class="post-metadata">

**Author:** ![cjordan](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@cjordan](https://devforum.zoom.us/u/cjordan)\
**Post date:** [January 31, 2022, 10:34pm UTC](https://devforum.zoom.us/t/problems-with-windows-c-sdk-getting-authenticated/63486/4 "2022-01-31T22:34:13Z")

</div>

The initialize code below

```auto
ZOOM_SDK_DOTNET_WRAP.InitParam param = new ZOOM_SDK_DOTNET_WRAP.InitParam();
            param.web_domain = "https://zoom.us";
            ZOOM_SDK_DOTNET_WRAP.SDKError err = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.Initialize(param);

```

produces the following error:  
SDKERR\_MODULE\_LOAD\_FAILED

---

<div class="post-metadata">

**Author:** ![cjordan](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@cjordan](https://devforum.zoom.us/u/cjordan)\
**Post date:** [January 31, 2022, 10:58pm UTC](https://devforum.zoom.us/t/problems-with-windows-c-sdk-getting-authenticated/63486/5 "2022-01-31T22:58:04Z")

</div>

I have everything set to “Release” and “x86” and it still produces the error  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/6/266c43b0ac7d06a1c67609d6ca6309b898c718c2.png)

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/7/872ae8f1681f24fd254d9095d00847b7482233a7.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [March 3, 2022, 8:58am UTC](https://devforum.zoom.us/t/problems-with-windows-c-sdk-getting-authenticated/63486/6 "2022-03-03T08:58:47Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
