# ZoomSDK.shared()!.getAuthService()!.logout() returning ZoomSDKError(rawValue: 4)

**URL:** <https://devforum.zoom.us/t/zoomsdk-shared-getauthservice-logout-returning-zoomsdkerror-rawvalue-4/60412>\
**Category:** macOS\
**Created:** [November 18, 2021, 10:45am UTC](https://devforum.zoom.us/t/zoomsdk-shared-getauthservice-logout-returning-zoomsdkerror-rawvalue-4/60412 "2021-11-18T10:45:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![niravd](https://avatars.discourse-cdn.com/v4/letter/n/9de0a6/32.png) [@niravd](https://devforum.zoom.us/u/niravd)\
**Post date:** [November 18, 2021, 10:45am UTC](https://devforum.zoom.us/t/zoomsdk-shared-getauthservice-logout-returning-zoomsdkerror-rawvalue-4/60412/1 "2021-11-18T10:45:47Z")

</div>

Hi,

I am able to login correctly onZoomSDKAuthReturn with ZoomSDKAuthError\_Success  
But the same when I try to logout It shows me this error  
ZoomSDK.shared()!.getAuthService()!.logout()  
Is returning ZoomSDKError(rawValue: 4)

what are the other details required from my end kindly let me know

---

<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:** [November 18, 2021, 10:37pm UTC](https://devforum.zoom.us/t/zoomsdk-shared-getauthservice-logout-returning-zoomsdkerror-rawvalue-4/60412/2 "2021-11-18T22:37:42Z")

</div>

Hi @niravd, thanks for the post.

Please note that I have moved your post over to the #desktop-meeting-sdk:macos category as this is a question about the Meeting SDK and not the Video SDK. 🙂

Regarding the error you are seeing, most commonly this error code (ZoomSDKError\_WrongUsage) indicates that you are not logged in at the time of trying to log out. Can you please verify what the login status is at the time you are calling this method by checking the [`onZoomSDKLoginResult`](https://marketplacefront.zoom.us/sdk/meeting/macos/protocol_zoom_s_d_k_auth_delegate_01-p.html#ad94321e777daf452d1f965cacc345c73) callback?

Thanks!

---

<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:** [December 19, 2021, 8:38am UTC](https://devforum.zoom.us/t/zoomsdk-shared-getauthservice-logout-returning-zoomsdkerror-rawvalue-4/60412/3 "2021-12-19T08:38:04Z")

</div>

Closed on December 19, 2021, 8:38am UTC

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