Auth error: ZoomSDKError_ServiceFailed

Description
I have the following code:

- (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.

Hi @blain,

Can you please confirm whether or not you have successfully initialized the SDK via initSDKWithParams?

Thanks!

Hi Jon,

Yes - the following code runs without error:

    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;

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!

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



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:

Am I missing anything?

Thanks.

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!

Hi Jon,

That turned out to be the issue - thanks! :slight_smile:

New issue: I have the following code to launch a meeting but I’m getting a ZoomSDKError_WrongUsage instead of ZoomSDKError_Success:

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!

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!

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