# Getting Auth Error 4

**URL:** <https://devforum.zoom.us/t/getting-auth-error-4/114403>\
**Category:** Windows\
**Created:** [July 25, 2024, 11:16pm UTC](https://devforum.zoom.us/t/getting-auth-error-4/114403 "2024-07-25T23:16:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayk](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jayk](https://devforum.zoom.us/u/Jayk)\
**Post date:** [July 25, 2024, 11:16pm UTC](https://devforum.zoom.us/t/getting-auth-error-4/114403/1 "2024-07-25T23:16:19Z")

</div>

**Description**  
Getting Auth Error 4 from MeetingSDK

**Which Windows Meeting SDK version?**  
v6.1.1.41755

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

1. Go to Github tanchunsiong/Zoom\_MeetingSDK\_Windows\_RawDataDemos @chunsiong.zoom  
Download and compile ChatDemo Code.
2. Create JWT Token using client id and secret

```auto
import jwt
import time
import os

def generate_signature(key, secret):
    iat = int(time.time()) - 30
    exp = iat + 60 * 60 * 2
    
    payload = {
        "appKey": key,
        "iat": iat,
        "exp": exp,
        "tokenExp": exp,
    }
    
    headers = {
        "alg": "HS256",
        "typ": "JWT"
    }
    print(payload)
    sdk_jwt = jwt.encode(payload, secret, algorithm="HS256", headers=headers)
    return sdk_jwt

zoom_key = ''
zoom_secret = ''

if zoom_key and zoom_secret:
    signature = generate_signature(zoom_key, zoom_secret)
    print(signature)
else:
    print("Zoom credentials not found in environment variables.")

```

1. Run Chatdemo.exe from debug folder and enter JWT key and meeting number
2. CaptionDemo\x64\Debug\>CaptionDemo.exe  
Trying to find meeting parameters from config.json.  
Didn’t find config.json file.  
SDK JWT: `<JWT>`  
Meeting Number: `<meeting number>`  
Passcode:  
Video Source (file path or URL):  
No video source provided, use the default video source: Big\_Buck\_Bunny\_1080\_10s\_1MB.mp4.  
SDK Initialized.  
CreateNetworkConnectionHelper created.  
NetworkConnectionHandler registered. Detecting proxy.  
onProxyDetectComplete  
AuthService created.  
AuthServiceEventListener added.  
Auth call started, auth in progress.  
Auth failed: 4

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

- OS: [e.g. Windows 11 Dev Environment]

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [July 26, 2024, 12:13am UTC](https://devforum.zoom.us/t/getting-auth-error-4/114403/2 "2024-07-26T00:13:42Z")

</div>

> [@Jayk](#):
>
> Trying to find meeting parameters from config.json.  
> Didn’t find config.json file.

@Jayk did you check the readme and create the config.json file?

---

<div class="post-metadata">

**Author:** ![Jayk](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jayk](https://devforum.zoom.us/u/Jayk)\
**Post date:** [July 26, 2024, 2:23pm UTC](https://devforum.zoom.us/t/getting-auth-error-4/114403/3 "2024-07-26T14:23:26Z")

</div>

Yes @chunsiong.zoom , it Just says

> CaptionDemo.exe  
> Trying to find meeting parameters from config.json.

And does not print anything more or do anything, it just exits. So tried without the file to see what’s the error message after filling in the values its prompting for. That’s when it says Auth Error 4.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [July 29, 2024, 2:34am UTC](https://devforum.zoom.us/t/getting-auth-error-4/114403/4 "2024-07-29T02:34:08Z")

</div>

@Jayk how does your config,json looks like?

It should look something like this  
{  
“sdk\_jwt”: “eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBLZXkiOiJpc1ZUWHZaQVNhZWhTZFZEalgzOHlRIiwiaWF0IjoxNzEzNzE1MjAwLCJleHAiOjE3MTM4ODgwMDAsInRva2VuRXhwIjoxNzEzODg4MDAwLCJtbiI6OTg5ODUzMzMxMywicm9sZSI6MX0.\_eB1eplBjnAkLWNxW9FaQGVbgj1oBIkGVGU9PP6HGAw”,  
“meeting\_number”: “9898533313”,  
“passcode”: “123123”,  
“video\_source”: “Big\_Buck\_Bunny\_720\_10s\_1MB.mp4”,  
“zak”: “”  
}

---

<div class="post-metadata">

**Author:** ![Jayk](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jayk](https://devforum.zoom.us/u/Jayk)\
**Post date:** [July 29, 2024, 5:03pm UTC](https://devforum.zoom.us/t/getting-auth-error-4/114403/5 "2024-07-29T17:03:57Z")

</div>

@chunsiong.zoom Correct, it looks like that.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [July 30, 2024, 2:31am UTC](https://devforum.zoom.us/t/getting-auth-error-4/114403/6 "2024-07-30T02:31:26Z")

</div>

@Jayk it works for my token. Can you share a sample of your token?

---

<div class="post-metadata">

**Author:** ![Jayk](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jayk](https://devforum.zoom.us/u/Jayk)\
**Post date:** [July 30, 2024, 4:10pm UTC](https://devforum.zoom.us/t/getting-auth-error-4/114403/7 "2024-07-30T16:10:17Z")

</div>

@chunsiong.zoom Will you be able to send a private message. i can post it there.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [July 31, 2024, 3:32am UTC](https://devforum.zoom.us/t/getting-auth-error-4/114403/8 "2024-07-31T03:32:51Z")

</div>

@Jayk I’ve checked on this. Error 4 happens when SDK disabled is disable for your account / tenant

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [August 30, 2024, 1:32pm UTC](https://devforum.zoom.us/t/getting-auth-error-4/114403/9 "2024-08-30T13:32:58Z")

</div>

Closed on August 30, 2024, 1:32pm UTC

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