# Auth error: ZoomSDKError\_ServiceFailed

**URL:** <https://devforum.zoom.us/t/auth-error-zoomsdkerror-servicefailed/67529>\
**Category:** macOS\
**Created:** [April 14, 2022, 4:34am UTC](https://devforum.zoom.us/t/auth-error-zoomsdkerror-servicefailed/67529 "2022-04-14T04:34:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![blain](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@blain](https://devforum.zoom.us/u/blain)\
**Post date:** [April 14, 2022, 4:34am UTC](https://devforum.zoom.us/t/auth-error-zoomsdkerror-servicefailed/67529/1 "2022-04-14T04:34:33Z")

</div>

**Description**  
I have the following code:

```auto
- (void)authorizeSDK
{
    const std::string sdkKey(kSDKKey);
    const std::string sdkSecret(kSDKSecret);
    
    ZoomSDKAuthService* authService = [[ZoomSDK sharedSDK] getAuthService];
    if(authService != nil)
    {
        authService.delegate = self;
        ZoomSDKError err = [authService sdkAuth:[NSString stringWithStdString:sdkKey] appSecret:[NSString stringWithStdString:sdkSecret]]; //DBG: err
        assert(err == ZoomSDKError_Success); //DBG
    }
}

- (void)onZoomSDKAuthReturn:(ZoomSDKAuthError)returnValue
{
    assert(returnValue == ZoomSDKAuthError_Success); //DBG
    
    if(returnValue == ZoomSDKAuthError_Success)
        _sessionMgr->LaunchMeetingWindow();
}

```

The problem is I’m getting err = ZoomSDKError\_ServiceFailed. What’s more, when the assertion at the end of authorizeSDK is commented out, the callback method - onZoomSDKAuthReturn: - isn’t being called at all.

What am I doing wrong?

**Which macOS Meeting SDK version?**  
SDK Version: 5.9.6 (5014)  
MacOS version: 10.15.7

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

Thanks.

---

<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:** [April 14, 2022, 5:58pm UTC](https://devforum.zoom.us/t/auth-error-zoomsdkerror-servicefailed/67529/2 "2022-04-14T17:58:33Z")

</div>

Hi @blain,

Can you please confirm whether or not you have successfully initialized the SDK via [`initSDKWithParams`](https://marketplacefront.zoom.us/sdk/meeting/macos/interface_zoom_s_d_k.html#af0c1292ea28e4e2f4eba5696aa3a5352)?

Thanks!

---

<div class="post-metadata">

**Author:** ![blain](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@blain](https://devforum.zoom.us/u/blain)\
**Post date:** [April 14, 2022, 11:43pm UTC](https://devforum.zoom.us/t/auth-error-zoomsdkerror-servicefailed/67529/3 "2022-04-14T23:43:01Z")

</div>

Hi Jon,

Yes - the following code runs without error:

```auto
    ZoomSDKInitParams* params = [[ZoomSDKInitParams alloc] init];
    params.needCustomizedUI = NO;
    params.teamIdentifier = nil;
    params.enableLog = YES;
    
    ZoomSDKError err = [[ZoomSDK sharedSDK] initSDKWithParams:params];
    assert(err == ZoomSDKError_Success);
    
    [[ZoomSDK sharedSDK] setZoomDomain:[NSString stringWithStdString:kDomain]];
    params = nil;

```

---

<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:** [April 15, 2022, 7:58pm UTC](https://devforum.zoom.us/t/auth-error-zoomsdkerror-servicefailed/67529/4 "2022-04-15T19:58:47Z")

</div>

Hi @blain,

Thanks for confirming. Since you are successfully initializing the SDK, I’m not seeing anything wrong with your implementation. Usually this means that there was an issue with how the SDK was added to your project, since that can have runtime implications. Can you please confirm how you added the SDK?

Thanks!

---

<div class="post-metadata">

**Author:** ![blain](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@blain](https://devforum.zoom.us/u/blain)\
**Post date:** [April 18, 2022, 5:59pm UTC](https://devforum.zoom.us/t/auth-error-zoomsdkerror-servicefailed/67529/5 "2022-04-18T17:59:40Z")

</div>

Hi Jon, I’ve attached pics of my XCode settings:

 ![Screen Shot 2022-04-18 at 10.30.59 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/7/d784d183b7c171f4392e47b25f6461edf2a3c174.jpeg)  
 ![Screen Shot 2022-04-18 at 10.33.44 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/f/efda47a6e33e3d72c630f925a91ac57a02f39dcd.png)  
 ![Screen Shot 2022-04-18 at 10.35.27 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/8/885b8b54364f20ee98bd8336cc3d76ffebffe9c0.jpeg)

Basically, I added and linked to all the files under the Universal-Intel+M1/ZoomSDK directory (.framework, .bundle, .dylib, .app) and there’s a script which copies them to the final product’s Frameworks directory:

 ![Screen Shot 2022-04-18 at 10.58.51 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/2/32b7872dbbce0efcb7bae1ba2e61f06ec1f3dc72.jpeg)

Am I missing anything?

Thanks.

---

<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:** [April 19, 2022, 10:01pm UTC](https://devforum.zoom.us/t/auth-error-zoomsdkerror-servicefailed/67529/6 "2022-04-19T22:01:54Z")

</div>

Hi @blain,

It does in fact look like this is where the issue lies. You will need a `Copy Files` build phase with a `Frameworks` destination containing the SDK’s files. Under `Link Binary With Libraries` add `ZoomSDK.framework` as well as the SDK files with a `dylib` extension. Due to the high number of individual files in the SDK, I would recommend comparing against the SDK sample app to be sure everything looks correct.

Thanks!

---

<div class="post-metadata">

**Author:** ![blain](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@blain](https://devforum.zoom.us/u/blain)\
**Post date:** [April 20, 2022, 5:33pm UTC](https://devforum.zoom.us/t/auth-error-zoomsdkerror-servicefailed/67529/7 "2022-04-20T17:33:43Z")

</div>

Hi Jon,

That turned out to be the issue - thanks! 🙂

New issue: I have the following code to launch a meeting but I’m getting a ZoomSDKError\_WrongUsage instead of ZoomSDKError\_Success:

 ![Screen Shot 2022-04-20 at 10.22.56 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/0/7/072648cc732a654fe2a0c9d17463a0e5fb1fec42.jpeg)

Questions:

1. What am I doing wrong?
2. What is the call flow for launching a meeting using the default zoom window?
3. Am I understanding correctly that the videoContainer member of the meetingService is what I’d configure if I wanted to use a custom UI? If so, can you provide the call flow for that as well?

Thanks!

---

<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:** [April 21, 2022, 10:46pm UTC](https://devforum.zoom.us/t/auth-error-zoomsdkerror-servicefailed/67529/8 "2022-04-21T22:46:07Z")

</div>

Hi @blain,

You are seeing this error because you are trying to start an instant meeting with a user type of `SDKUserType_APIUser`. An API users refers to a type of user who was created through the REST API and does not have the ability to log into Zoom. These types of users are unable to create instant meetings.

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:** [May 22, 2022, 8:47am UTC](https://devforum.zoom.us/t/auth-error-zoomsdkerror-servicefailed/67529/9 "2022-05-22T08:47:05Z")

</div>

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