# ZoomSDK C# Wrapper: AUTHRET\_OVERTIME when calling SDKAuth

**URL:** <https://devforum.zoom.us/t/zoomsdk-c-wrapper-authret-overtime-when-calling-sdkauth/97066>\
**Category:** Windows\
**Created:** [October 19, 2023, 12:18pm UTC](https://devforum.zoom.us/t/zoomsdk-c-wrapper-authret-overtime-when-calling-sdkauth/97066 "2023-10-19T12:18:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ege.apak](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@ege.apak](https://devforum.zoom.us/u/ege.apak)\
**Post date:** [October 19, 2023, 12:18pm UTC](https://devforum.zoom.us/t/zoomsdk-c-wrapper-authret-overtime-when-calling-sdkauth/97066/1 "2023-10-19T12:18:48Z")

</div>

Hi Team!

**Description**  
We have a custom Windows Desktop App integrating with Zoom Meeting SDK using C# Wrapper. On some cases when I call SDKAuth(authContext) the onAuthenticationReturn callback result is AUTHRET\_OVERTIME, however there is no appearent network problem and initialization and authentication usually doesn’t produce this result.

**Which Desktop Client SDK version?**  
v5.16.1

**Device:**  
Windows 10 Desktop

**Additional context**  
I am initializing ZoomSDK with domain “[https://zoom.us](https://zoom.us)” and after initialization I authenticate the SDK with a JWT token. I enabled logging to find out what the issue is but the log files seems encrypted so I can’t work out the problem. I would like to share the log files as well.

Here is my authentication code.

```auto
        private static string? CreateToken(DateTime issuedAt)
        {
            var tokenExp = issuedAt + TimeSpan.FromDays(1);
            var tokenDescriptor = new SecurityTokenDescriptor
            {
                Claims = new Dictionary<string, object>
                {
                    ["appKey"] = APP_KEY,
                    ["tokenExp"] = ((DateTimeOffset)(tokenExp.ToLocalTime())).ToUnixTimeSeconds()
                },
                IssuedAt = issuedAt.ToLocalTime(),
                Expires = (issuedAt + TimeSpan.FromDays(1)).ToLocalTime(),
                NotBefore = issuedAt.ToLocalTime(),
                SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(Encoding.ASCII.GetBytes(APP_SECRET)), SecurityAlgorithms.HmacSha256)
            };

            var tokenHandler = new JwtSecurityTokenHandler();
            var token = tokenHandler.CreateToken(tokenDescriptor);
            var serializedToken = tokenHandler.WriteToken(token);
            return serializedToken;
        }

        public static async Task<SDKError> Auth(DateTime? issueDate = null)
        {
            AuthContext authContext = new AuthContext()
            {
                jwt_token = CreateToken(issueDate ?? DateTime.UtcNow)
            };
            CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onAuthenticationReturn(OnAuthenticationReturn);
            CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onLoginRet(OnLoginReturn);
            SDKError err = CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(authContext);
            
            var authResult = await _authenticationResult.Task;

            System.Diagnostics.Trace.WriteLine(CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().GetSDKIdentity(), "ZoomSDK");

            _authenticationResult = new TaskCompletionSource<AuthResult>();
            if (authResult != AuthResult.AUTHRET_SUCCESS)
            {
                _logger.Error($"AV Authentication failed! Status: {authResult} | Token: {authContext.jwt_token}");
                return SDKError.SDKERR_UNAUTHENTICATION;
            }
            
            SetupCallbacks();

            return err;
        }

```

Thank you,  
Ege.

---

<div class="post-metadata">

**Author:** ![ege.apak](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@ege.apak](https://devforum.zoom.us/u/ege.apak)\
**Post date:** [October 24, 2023, 1:04pm UTC](https://devforum.zoom.us/t/zoomsdk-c-wrapper-authret-overtime-when-calling-sdkauth/97066/2 "2023-10-24T13:04:40Z")

</div>

Hi Team.

I just wanted to update this ticket since it has been five days since I created this ticket. This is a very pressing issue and since our SDK update to 5.16.1 our customers are also experiencing problems because of AUTHRET\_OVERTIME.

Looking forward to your assistance.

Thank you,  
Ege.

---

<div class="post-metadata">

**Author:** ![ege.apak](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@ege.apak](https://devforum.zoom.us/u/ege.apak)\
**Post date:** [November 23, 2023, 11:30am UTC](https://devforum.zoom.us/t/zoomsdk-c-wrapper-authret-overtime-when-calling-sdkauth/97066/3 "2023-11-23T11:30:26Z")

</div>

Hi Team,

I am writing to follow up on my previous messages regarding the AUTHRET\_OVERTIME error we are encountering with the Zoom Meeting SDK (v5.16.1) in our custom Windows Desktop App. This issue remains unresolved and is increasingly impacting our service and customers.

To reiterate, we are using the C# Wrapper for integration, and the problem occurs when calling SDKAuth(authContext). The onAuthenticationReturn callback frequently results in an AUTHRET\_OVERTIME error, despite no apparent network issues. This is particularly concerning as this error was not prevalent prior to our SDK update to version 5.16.1.

Thank you for your time and support,  
Ege.

---

<div class="post-metadata">

**Author:** ![ege.apak](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@ege.apak](https://devforum.zoom.us/u/ege.apak)\
**Post date:** [December 22, 2023, 6:37am UTC](https://devforum.zoom.us/t/zoomsdk-c-wrapper-authret-overtime-when-calling-sdkauth/97066/4 "2023-12-22T06:37:18Z")

</div>

Hi Team,

This issue remains unresolved and is still impacting our service and customers. We have moved to Zoom SDK v5.16.10 and the problem persists.

Thank you for your time and support,  
Ege.

---

<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:** [January 21, 2024, 4:37pm UTC](https://devforum.zoom.us/t/zoomsdk-c-wrapper-authret-overtime-when-calling-sdkauth/97066/5 "2024-01-21T16:37:41Z")

</div>

Closed on January 21, 2024, 4:37pm UTC

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