# Joining meeting using MeetingSDK fails with AUTHRET\_UNKNOWN

**URL:** <https://devforum.zoom.us/t/joining-meeting-using-meetingsdk-fails-with-authret-unknown/96023>\
**Category:** Windows\
**Created:** [September 29, 2023, 1:36pm UTC](https://devforum.zoom.us/t/joining-meeting-using-meetingsdk-fails-with-authret-unknown/96023 "2023-09-29T13:36:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![p3john](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/p3john/32/28463_2.png) [@p3john](https://devforum.zoom.us/u/p3john)\
**Post date:** [September 29, 2023, 1:36pm UTC](https://devforum.zoom.us/t/joining-meeting-using-meetingsdk-fails-with-authret-unknown/96023/1 "2023-09-29T13:36:16Z")

</div>

**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:

1. Initialize the SDK  
ZOOM\_SDK\_DOTNET\_WRAP.CZoomSDKeDotNetWrap.Instance.Initialize()

2. Wire the authentication callback:  
GetAuthServiceWrap().Add\_CB\_onAuthenticationReturn([callback delegate goes here])

3. Use the Client ID and Client Secret from the app registration in the Marketplace to generate the JWT token:

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

```

1. Authenticate the SDK

```auto
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

1. Handle the authentication callback

```auto
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.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [October 3, 2023, 5:17am UTC](https://devforum.zoom.us/t/joining-meeting-using-meetingsdk-fails-with-authret-unknown/96023/2 "2023-10-03T05:17:46Z")

</div>

@p3john , what is the type of Windows Application you referring to?

It has been tested to work on WPF (.net) and Windows form(.net) application.

---

<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:** [November 2, 2023, 3:18pm UTC](https://devforum.zoom.us/t/joining-meeting-using-meetingsdk-fails-with-authret-unknown/96023/3 "2023-11-02T15:18:38Z")

</div>

Closed on November 2, 2023, 3:18pm UTC

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