# SDK Authentication Error Code 1

**URL:** <https://devforum.zoom.us/t/sdk-authentication-error-code-1/34956>\
**Category:** iOS\
**Created:** [November 2, 2020, 11:35pm UTC](https://devforum.zoom.us/t/sdk-authentication-error-code-1/34956 "2020-11-02T23:35:29Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![crogers83](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@crogers83](https://devforum.zoom.us/u/crogers83)\
**Post date:** [November 2, 2020, 11:35pm UTC](https://devforum.zoom.us/t/sdk-authentication-error-code-1/34956/1 "2020-11-02T23:35:29Z")

</div>

**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/](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](https://github.com/zoom/zoom-sdk-ios/releases/tag/v5.2.41739.1022)

**Screenshots**

 ![Screen Shot 2020-10-30 at 8.00.39 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/2/f2b6433b90b5a8f63cf9d0973a2ac40ed85a1dda.png)

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

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

**Additional context**  
Any help would be appreciated!!!

---

<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:** [November 3, 2020, 6:59pm UTC](https://devforum.zoom.us/t/sdk-authentication-error-code-1/34956/2 "2020-11-03T18:59:20Z")

</div>

Hey @crogers83

Thanks for using the dev forum!

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

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](http://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

---

<div class="post-metadata">

**Author:** ![crogers83](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@crogers83](https://devforum.zoom.us/u/crogers83)\
**Post date:** [November 8, 2020, 10:30pm UTC](https://devforum.zoom.us/t/sdk-authentication-error-code-1/34956/3 "2020-11-08T22:30:43Z")

</div>

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](http://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](http://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  
{

#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

---

<div class="post-metadata">

**Author:** ![mohammed.adel.sorour](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@mohammed.adel.sorour](https://devforum.zoom.us/u/mohammed.adel.sorour)\
**Post date:** [November 9, 2020, 10:58am UTC](https://devforum.zoom.us/t/sdk-authentication-error-code-1/34956/4 "2020-11-09T10:58:22Z")

</div>

meet now is not responsive and join meeting do nothing any 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:** [November 9, 2020, 8:55pm UTC](https://devforum.zoom.us/t/sdk-authentication-error-code-1/34956/5 "2020-11-09T20:55:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![crogers83](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@crogers83](https://devforum.zoom.us/u/crogers83)\
**Post date:** [November 9, 2020, 9:14pm UTC](https://devforum.zoom.us/t/sdk-authentication-error-code-1/34956/6 "2020-11-09T21:14:49Z")

</div>

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

 ![Screen Shot 2020-11-09 at 4.11.53 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/d/cd44020515d877f7446e8b1b29c5bed9ab1aec3f.png)  
Thanks!

---

<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:** [November 10, 2020, 11:58pm UTC](https://devforum.zoom.us/t/sdk-authentication-error-code-1/34956/7 "2020-11-10T23:58:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![crogers83](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@crogers83](https://devforum.zoom.us/u/crogers83)\
**Post date:** [November 11, 2020, 12:27am UTC](https://devforum.zoom.us/t/sdk-authentication-error-code-1/34956/8 "2020-11-11T00:27:09Z")

</div>

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

Carter

---

<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:** [November 11, 2020, 12:28am UTC](https://devforum.zoom.us/t/sdk-authentication-error-code-1/34956/9 "2020-11-11T00:28:52Z")

</div>

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
