Getting Auth Error 4

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
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]

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

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.

@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”: “”
}

@chunsiong.zoom Correct, it looks like that.

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

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

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

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