SDK Authentication Error Code 1

Description
Hello all, I’m running the Simulator-friendly version of MobileRTCSample and I’m running into an error that I can’t seem to find any information on. I’m using the correct Key and Secret, and am following this tutorial: https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/getting-started/
In addition to this error code, I’m only able to use the “Join Meeting” button on the app’s home screen; settings and “Meet Now” are unresponsive. The meeting information box comes up when attempting to join, but upon entering information and pressing OK, the dialog box disappears and nothing happens.

Which version?
I am using v5.2.41739.1022

Screenshots

Smartphone (please complete the following information):

  • Running on iPod Touch 7th Gen (Emulated on macOS Catalina)

Additional context
Any help would be appreciated!!!

Hey @crogers83

Thanks for using the dev forum!

This error can be caused by a couple different issues. So lets troubleshoot together :slight_smile:

  1. If you are using client key and client secret for authentication, make sure you also remove the .token parameter when you are authorizing the SDK.
  2. Have you set the domain? If not, try setting it to “zoom.us”.
  3. In the past people have provided a Zoom API Key and Secret instead of a Zoom SDK Key and Secret. When you log into the Zoom Marketplace, make sure you are using the key and secret in the SDK tile and not the JWT tile.

If this continues after this can you provide your code for appDelegate.h and sdkAuthPresenter.m? Please remove your sdk credentials before posting.

Thanks!
Michael

Hi Michael, sorry for the delay as I’ve been trying your suggestions + some other things to fix the issue, and here’s what I’ve found.

I can put any string under KjwtToken and the error will disappear, but the problem persists that settings and meet now don’t trigger a response. Join meeting will still prompt meeting credentials, but will be unable to join a valid meeting when filled in. I apologize but I’m very new to this type of development! I tried generating a valid JWT token using jwt.io but this hasn’t solved the issue yet, and I’m not getting any error codes.

Here’s my code for appDelegate.h:

//
#import <UIKit/UIKit.h>

#define KjwtToken @“JWT_TOKEN”

#define kSDKDomain @“zoom.us

#define kSDKAppKey @“SDKAPPKEY”

#define kSDKAppSecret @“SDKAPPSECRET”

@interface AppDelegate : UIResponder <UIApplicationDelegate, UIAlertViewDelegate, MobileRTCPremeetingDelegate>

@property ( strong , nonatomic ) UIWindow *window;

  • (UIViewController *)topViewController;

@end

and here’s my code for sdkAuthPresenter.m:

//
// SDKAuthPresenter.m
// MobileRTCSample
//
// Created by Zoom Video Communications on 2018/11/15.
// Copyright © 2018 Zoom Video Communications, Inc. All rights reserved.
//

#import “SDKAuthPresenter.h”
#import “AppDelegate.h”
#import “SDKAuthPresenter+AuthDelegate.h”

@interface SDKAuthPresenter()

@end

@implementation SDKAuthPresenter

  • (void)SDKAuth:(NSString *)jwtToken
    {

    MobileRTCAuthService *authService = [[MobileRTC sharedRTC] getAuthService];
    if (authService)
    {
    authService.delegate = self;
    // Here need add your jwtToken, if jwtToken is nil or empty,We will user your clientKey and clientSecret to Auth, We recommend using JWTToken.
    authService.jwtToken = jwtToken;
    [authService sdkAuth];
    }
    }

#pragma mark - AlertView Delegate

  • (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
    {
    if (buttonIndex != alertView.cancelButtonIndex)
    {
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
    [self SDKAuth:KjwtToken];
    });
    }
    }

@end

Thanks,
Carter

meet now is not responsive and join meeting do nothing any help?

Hey @crogers83

No need to apologize!

It looks like the JWT may not be valid.
Can you provide the payload of the JWT you are using? Instead of the SDK key and secret please just put “key” and “secret”.

Thanks!
Michael

Here’s what I’m currently using, it’s likely that the epoch times are not what they are supposed to be.


Thanks!

Hey @crogers83,

The tokenEXP should also be in epoch time. Try setting it to be the same as your “exp” value.

Let me know if that works.
Thanks!
Michael

It works! Thanks so much @Michael_Condon
Just to clarify, under what circumstances would I need to change the Token?

Carter

1 Like

Hey @crogers83

Awesome! I am so happy to hear!

So that token will be valid until one of those expirations has hit. Otherwise, you can use it as much as you want.

Thanks!
Michael

1 Like