# \[Desktop SDK (Windows 10, C++)\] AUTHRET\_NONE Error Code, need help with interpretation

**URL:** <https://devforum.zoom.us/t/desktop-sdk-windows-10-c-authret-none-error-code-need-help-with-interpretation/54176>\
**Category:** Windows\
**Created:** [July 15, 2021, 7:53am UTC](https://devforum.zoom.us/t/desktop-sdk-windows-10-c-authret-none-error-code-need-help-with-interpretation/54176 "2021-07-15T07:53:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vlyalung](https://avatars.discourse-cdn.com/v4/letter/v/3e96dc/32.png) [@vlyalung](https://devforum.zoom.us/u/vlyalung)\
**Post date:** [July 15, 2021, 7:53am UTC](https://devforum.zoom.us/t/desktop-sdk-windows-10-c-authret-none-error-code-need-help-with-interpretation/54176/1 "2021-07-15T07:53:14Z")

</div>

**Description**  
Hello! I’m currently experiencing the exact same problem seen here:

> [@C++: Authorization issue. AUTHRET\_NONE from authService-\>GetAuthResult, callback never invoked, can't login or join meetings](https://devforum.zoom.us/t/c-authorization-issue-authret-none-from-authservice-getauthresult-callback-never-invoked-cant-login-or-join-meetings/50792):
>
> Description I’m having trouble getting my application to authorize with the Zoom SDK. The JWT I’m using works fine with the demo, so I’m assuming the JWT isn’t the issue. I’ve tried to crawl through the demo to see exactly how it’s authorizing, but I do not appear to be doing anything different, though it’s hard to tell exactly what order things happen in the demo. The [written instructions in the docs](https://marketplace.zoom.us/docs/sdk/native-sdks/windows/mastering-sdk/windows-sdk-functions) appear to be out-of-date. Which Windows Client SDK version? v5.4.54802.0124 Also tested on …

I also understand that the solution is here:

> [@joinSession Event callbacks are not fired](https://devforum.zoom.us/t/joinsession-event-callbacks-are-not-fired/43426/11):
>
> The console application need a Message Loop so that messages can be delivered to the correct procedure. The application needs a loop to retrieve the messages and dispatch them to the correct windows. So I have implement this Message Loop in my console application and my console application is also working now. Use below message loop in main function of Console Application to make it work: bool bRet = false; MSG msg; while ((bRet = GetMessage(&msg, nullptr, 0, 0)) != 0) { if (bRet == -1) …

But my problem is I am unsure where to place the code snippet posted by mtaha relative to the code that gets the authentication result, assuming my code follows the same general format as the code seen in link #1, and that everything is located in main() at the moment.

I think this also falls down to me not exactly understanding the solution, and I apologize in advance for my inexperience, but I’d really appreciate some help or perspective on this one

**Which Windows Client SDK version?**  
I am working in zoom-sdk-windows-5.5.12511.0422.

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

- Device: Dell G5
- OS: Windows 10

---

<div class="post-metadata">

**Author:** ![Zulunko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/zulunko/32/27398_2.png) [@Zulunko](https://devforum.zoom.us/u/Zulunko)\
**Post date:** [July 15, 2021, 9:30am UTC](https://devforum.zoom.us/t/desktop-sdk-windows-10-c-authret-none-error-code-need-help-with-interpretation/54176/2 "2021-07-15T09:30:07Z")

</div>

I found the images on [this documentation page](https://marketplace.zoom.us/docs/sdk/native-sdks/windows/mastering-sdk/SDK-Architecture-and-Workflow) somewhat useful. On those flow images, any point where the arrows are dotted and pointing to the left your application should be essentially just waiting for a callback. This is when the message passing is essential for the application to function, as otherwise those callbacks will never be called.

In your case, calling the message passing loop after calling SDKAuth should let you authorize successfully, provided you have given the SDK a callback. The simplest way to make this work is:

1. Initialize the SDK by calling InitSDK with valid params
2. Get an authService by calling CreateAuthService
3. Give it your event handler (which is a class that extends IAuthServiceEvent) by calling the authService’s SetEvent function
4. Call the authService’s SDKAuth (with a valid JWT)
5. Spin in the message passing loop until the callback has been called (your callback could break the loop somehow once it’s successfully called)

A similar order of events happen for other parts of the SDK as well (e.g. logging into a Zoom account), so I used a sort of state machine where my application had active states where it would perform actions (e.g. sending out auth or login requests) and passive states where it would simply allow the message loop to continue because it had to wait for a callback (e.g. when waiting for auth or login).

Hopefully this description is enough to at least get you a successful auth; things made a lot more sense for me once I finally figured out this problem.

---

<div class="post-metadata">

**Author:** ![mtaha](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mtaha/32/17373_2.png) [@mtaha](https://devforum.zoom.us/u/mtaha)\
**Post date:** [July 15, 2021, 9:32am UTC](https://devforum.zoom.us/t/desktop-sdk-windows-10-c-authret-none-error-code-need-help-with-interpretation/54176/3 "2021-07-15T09:32:20Z")

</div>

Put this code at the end of your main function before return.  
unsigned int bRet = -1;  
MSG msg;  
while ((bRet = GetMessage(&msg, nullptr, 0, 0)) != 0)  
{  
if (bRet == -1)  
{  
// handle the error and possibly exit  
}  
else  
{  
TranslateMessage(&msg);  
DispatchMessage(&msg);  
}  
}

Explanation of this logic has already provided here: [joinSession Event callbacks are not fired - #11 by mtaha](https://devforum.zoom.us/t/joinsession-event-callbacks-are-not-fired/43426/11)

Hope this will work for you.

---

<div class="post-metadata">

**Author:** ![vlyalung](https://avatars.discourse-cdn.com/v4/letter/v/3e96dc/32.png) [@vlyalung](https://devforum.zoom.us/u/vlyalung)\
**Post date:** [July 15, 2021, 10:48am UTC](https://devforum.zoom.us/t/desktop-sdk-windows-10-c-authret-none-error-code-need-help-with-interpretation/54176/4 "2021-07-15T10:48:42Z")

</div>

This is incredibly useful advice! I am beginning to understand, thank you both very much. I will get to working on the suggestions you’ve given to me and see if everything works fine.

It’s a little embarassing to say, but I completely glossed over the fact that I hadn’t even implemented any functionalities to the class I made that derived IAuthServiceEvent. I appreciate the help, thanks very much!

---

<div class="post-metadata">

**Author:** ![vlyalung](https://avatars.discourse-cdn.com/v4/letter/v/3e96dc/32.png) [@vlyalung](https://devforum.zoom.us/u/vlyalung)\
**Post date:** [July 16, 2021, 6:09am UTC](https://devforum.zoom.us/t/desktop-sdk-windows-10-c-authret-none-error-code-need-help-with-interpretation/54176/5 "2021-07-16T06:09:47Z")

</div>

Hello again! I got the Zoom SDK to join a meeting without many hiccups thanks to your advice.  
It all really boiled down to me being unfamiliar with the Windows API overall, I didn’t understand at first what the message loop was for, and thought I’d have to put function calls in the loop somewhere and expect it to fire when appropriate.

Thank you again so much for the help!

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [July 16, 2021, 7:17pm UTC](https://devforum.zoom.us/t/desktop-sdk-windows-10-c-authret-none-error-code-need-help-with-interpretation/54176/6 "2021-07-16T19:17:52Z")

</div>

Thank you @mtaha and @Zulunko for resolving this issue 🙂

Michael

---

<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:** [August 16, 2021, 5:18am UTC](https://devforum.zoom.us/t/desktop-sdk-windows-10-c-authret-none-error-code-need-help-with-interpretation/54176/7 "2021-08-16T05:18:33Z")

</div>

Closed on August 16, 2021, 5:18am UTC

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