# SDK internal error on auth

**URL:** <https://devforum.zoom.us/t/sdk-internal-error-on-auth/30547>\
**Category:** Windows\
**Created:** [September 17, 2020, 9:47am UTC](https://devforum.zoom.us/t/sdk-internal-error-on-auth/30547 "2020-09-17T09:47:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![svetlichny.dev](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@svetlichny.dev](https://devforum.zoom.us/u/svetlichny.dev)\
**Post date:** [September 17, 2020, 9:47am UTC](https://devforum.zoom.us/t/sdk-internal-error-on-auth/30547/1 "2020-09-17T09:47:36Z")

</div>

I tried to get started with zoom desktop SDK and I got SDKERR\_INTELNAL\_ERROR response every time when I called m\_AuthSDKWorkFlow.Auth(param).  
I tried c++ and c# versions - result the same.  
What is wrong?

Version  
v5.0.24433.0616  
zoom-sdk-windows-master\demo\sdk\_demo\_v2\sdk\_demo\_v2\_2017.sln

To Reproduce  
1 On the first form press button “SetDomain”. “[https://zoom.us](https://zoom.us)” in the field  
2 On the second form enter JWT Token in the field and press “Auth”  
I got error “auth sdk failed”. In the debugged I can see it is SDKError::SDKERR\_INTELNAL\_ERROR(15)

logs

> **[sdk\_demo\_v2\_2017.exe\_Video\_0.zip](https://drive.google.com/file/d/1mBG3_2oeia0-GdlxKIdDVl19DFxgGtcn/view?usp=sharing)**
>
> Google Drive file.

---

<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, 12:52am UTC](https://devforum.zoom.us/t/sdk-internal-error-on-auth/30547/2 "2020-09-26T00:52:13Z")

</div>

Hi @svetlichny.dev,

Thanks for the post and pardon the late response. Based on the log provided, it seems like the JWT token is invalid. Could you provide a sample of your JWT payload?

You may also refer to the instruction here: [https://github.com/zoom/zoom-sdk-windows/blob/master/CHANGELOG.md#new-sdk-initialization-method-using-jwt-token](https://github.com/zoom/zoom-sdk-windows/blob/master/CHANGELOG.md#new-sdk-initialization-method-using-jwt-token)

Thanks!

---

<div class="post-metadata">

**Author:** ![svetlichny.dev](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@svetlichny.dev](https://devforum.zoom.us/u/svetlichny.dev)\
**Post date:** [October 2, 2020, 12:28pm UTC](https://devforum.zoom.us/t/sdk-internal-error-on-auth/30547/3 "2020-10-02T12:28:08Z")

</div>

Hi @carson.zoom,  
Thanks for your answer. I tried to get new jwt token but result the same.  
Also I tried using AuthParam instead of AuthContext. Result was negative. I got other error in the end.

```
	ZOOM_SDK_NAMESPACE::AuthParam param;
	param.appKey = myAppKey;
	param.appSecret = myAppSecret;

```

My jwt payload  
HEADER:ALGORITHM & TOKEN TYPE  
{  
“typ”: “JWT”,  
“alg”: “HS256”  
}  
PAYLOAD:DATA  
{  
“aud”: null,  
“iss”: “uogDBCKpQeiEQXUOZNkeUA”,  
“exp”: 1602244849,  
“iat”: 1601640050  
}

Thanks

---

<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 10, 2020, 3:57am UTC](https://devforum.zoom.us/t/sdk-internal-error-on-auth/30547/4 "2020-10-10T03:57:07Z")

</div>

Hi @svetlichny.dev,

Thanks for reply and pardon the late response. The JWT payload that the SDK is expecting is(As shown in [https://github.com/zoom/zoom-sdk-windows/blob/master/CHANGELOG.md#new-sdk-initialization-method-using-jwt-token](https://github.com/zoom/zoom-sdk-windows/blob/master/CHANGELOG.md#new-sdk-initialization-method-using-jwt-token)):

```auto
{
	   "appKey": "string", // Your SDK key
         "iat": long, // access token issue timestamp
         "exp": long, // access token expire timestamp, max: iat + 2 days
         "tokenExp": long // token expire timestamp, MIN:30 minutes
}

```

Here is a code snippet that could be helpful in generating the 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')

```

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![svetlichny.dev](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@svetlichny.dev](https://devforum.zoom.us/u/svetlichny.dev)\
**Post date:** [October 10, 2020, 8:58am UTC](https://devforum.zoom.us/t/sdk-internal-error-on-auth/30547/5 "2020-10-10T08:58:36Z")

</div>

Thank you for help  
Everything works great after correct token generation

---

<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:48am UTC](https://devforum.zoom.us/t/sdk-internal-error-on-auth/30547/6 "2020-10-17T02:48:59Z")

</div>

Glad to be helpful. I will go ahead and close this thread. Please feel free to create another post if any other questions. 🙂

---

<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:49am UTC](https://devforum.zoom.us/t/sdk-internal-error-on-auth/30547/7 "2020-10-17T02:49:01Z")

</div>


