# Electron SDK Demo App Authorization Not Works. Auth Unknown error\[ZoomAuthResult.AUTHRET\_UNKNOWN\]

**URL:** <https://devforum.zoom.us/t/electron-sdk-demo-app-authorization-not-works-auth-unknown-error-zoomauthresult-authret-unknown/31089>\
**Category:** Electron\
**Created:** [September 23, 2020, 1:26pm UTC](https://devforum.zoom.us/t/electron-sdk-demo-app-authorization-not-works-auth-unknown-error-zoomauthresult-authret-unknown/31089 "2020-09-23T13:26:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuyo217](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yuyo217/32/15801_2.png) [@yuyo217](https://devforum.zoom.us/u/yuyo217)\
**Post date:** [September 23, 2020, 1:26pm UTC](https://devforum.zoom.us/t/electron-sdk-demo-app-authorization-not-works-auth-unknown-error-zoomauthresult-authret-unknown/31089/1 "2020-09-23T13:26:23Z")

</div>

**Description**

> [@Electron SDK Demo App Authorization Not Works. Error code 15](https://devforum.zoom.us/t/electron-sdk-demo-app-authorization-not-works-error-code-15/23249):
>
> Description Token authorization does not work in the demo app. It returns error code 15. Token works fine and tested with Zoom API. Which version? Latest. To Reproduce(If applicable) Steps to reproduce the behavior: Run the demo app. Enter token. Click the SDKAuth button. See the error at the console output. Screenshots If applicable, add screenshots to help explain your problem.

**Which version?**  
Latest

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Run the demo app.
2. Enter token.
3. Click the SDKAuth button.
4. See the error at the console output.

**Screenshots**

 ![zoom](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/6/6de211cb50062e596b63d2b7a516a5de6d2d2c8a.gif)

**Additional context**  
Add any other context about the problem here.

I’ve add a line to show the sdkauthCB status as:

line 52: function sdkauthCB(status) {  
line 53: console.log("sdkauthCB status: ", status);  
line 54: if (ZoomAuthResult.AUTHRET\_SUCCESS == status) {

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [September 26, 2020, 1:18am UTC](https://devforum.zoom.us/t/electron-sdk-demo-app-authorization-not-works-auth-unknown-error-zoomauthresult-authret-unknown/31089/2 "2020-09-26T01:18:03Z")

</div>

Hi @yuyo217,

Thanks for the post. Could you post a sample of your JWT payload?

Thanks!

---

<div class="post-metadata">

**Author:** ![yuyo217](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yuyo217/32/15801_2.png) [@yuyo217](https://devforum.zoom.us/u/yuyo217)\
**Post date:** [October 15, 2020, 8:21am UTC](https://devforum.zoom.us/t/electron-sdk-demo-app-authorization-not-works-auth-unknown-error-zoomauthresult-authret-unknown/31089/3 "2020-10-15T08:21:46Z")

</div>

JWT Token:  
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOm51bGwsImlzcyI6IlZsR3pIR1ZnU2ltV0NPaVN2dDJaSVEiLCJleHAiOjE2MDMzNTQ4NTAsImlhdCI6MTYwMjc1MDA1MH0.00LHri-\_-IEtlL3zN27uDfXe2KPwzVa9chsP-cEGh40

The token will be expired at 16:20 10/22/2020

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [October 17, 2020, 2:21am UTC](https://devforum.zoom.us/t/electron-sdk-demo-app-authorization-not-works-auth-unknown-error-zoomauthresult-authret-unknown/31089/4 "2020-10-17T02:21:48Z")

</div>

Hi @yuyo217,

Thanks for providing the token. The `exp` cannot be more than 2 days after `iat`, you may leverage the python script here to generate your JWT token:

```auto
    iat = long(int(time.time()))
    exp = long((datetime.datetime.today() + datetime.timedelta(days=2)).strftime("%s"))
    tokenExp = long((datetime.datetime.today() + datetime.timedelta(hours=1)).strftime("%s"))

    payload = {
        'appKey': key,
        'iat': iat,
        'exp': exp,
        'tokenExp': tokenExp
    }
    encoded = jwt.encode(payload, secret, algorithm='HS256')

```

Thanks!
