# Linux Zoom meeting sdk not generating authentication return callback

**URL:** <https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888>\
**Category:** Meeting SDK\
**Created:** [October 17, 2023, 5:11am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888 "2023-10-17T05:11:24Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![15107478682](https://avatars.discourse-cdn.com/v4/letter/1/bbce88/32.png) [@15107478682](https://devforum.zoom.us/u/15107478682)\
**Post date:** [October 17, 2023, 5:11am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/1 "2023-10-17T05:11:24Z")

</div>

```auto
include <unistd.h>

#include <iostream>

#include <string>

#include "auth_service_interface.h"

#include "meeting_service_interface.h"

#include "zoom_sdk.h"

#include "zoom_sdk_def.h"

#include <X11/Xlib.h>

#include <X11/Xatom.h>

USING_ZOOM_SDK_NAMESPACE

class MeetingServiceEventListener : public IMeetingServiceEvent {};

class Main : public IAuthServiceEvent {

  private:

    IAuthService *_authService;

    IMeetingService *_meetingService;

    uint64_t _meetingNumber;

    std::string _sessionName;

    std::string _apiKey;

    std::string _apiSecret;

  public:

    Main() {

        uint64_t meetingNumber = 4452252955; // replace with real

        std::string sessionName = std::to_string(meetingNumber);

        std::string apiKey = "...";

        std::string apiSecret = "...";

        _meetingNumber = meetingNumber;

        _sessionName = sessionName;

        _apiKey = apiKey;

        _apiSecret = apiSecret;

        InitParam initParam;

        initParam.strWebDomain = "https://zoom.us";

        initParam.strSupportUrl = "https://zoom.us";

        initParam.emLanguageID = LANGUAGE_English;

        initParam.enableLogByDefault = true;

        initParam.enableGenerateDump = true;

        SDKError err = InitSDK(initParam);

        if (err != SDKERR_SUCCESS) {

            std::cout << "Failed to init SDK." << err << std::endl;

        }

        SDKError authServiceInitReturnVal = CreateAuthService(&_authService);

        if (authServiceInitReturnVal != SDKError::SDKERR_SUCCESS) {

            std::cout << "Failed to init Auth Service." << err << std::endl;

        }

        SDKError meetingServiceInitReturnVal =

            CreateMeetingService(&_meetingService);

        if (meetingServiceInitReturnVal != SDKError::SDKERR_SUCCESS) {

            std::cout << "Failed to init meeting service. "

                      << meetingServiceInitReturnVal << std::endl;

        }

    }

    void onAuthenticationReturn(ZOOM_SDK_NAMESPACE::AuthResult ret) {

        std::cout << "Authentication result: " << _authService->GetAuthResult()

                  << std::endl;

        if (ret == AuthResult::AUTHRET_JWTTOKENWRONG) {

            std::cout << "JWT token is wrong." << std::endl;

            // SDK Auth call failed because the JWT token is invalid.

        } else if (ret == AuthResult::AUTHRET_SUCCESS) {

            std::cout << "Auth return success." << std::endl;

            join();

        } else {

            std::cout << "Something else went wrong: " << ret << std::endl;

            //QCoreApplication::exit(1);

        }

    }

    void onLoginReturnWithReason(LOGINSTATUS ret, IAccountInfo *pAccountInfo,

                                 LoginFailReason reason) {

        std::cout << "Login return with reason." << reason << std::endl;

    }

    void onLogout() { std::cout << "Logout" << std::endl; }

    void onZoomIdentityExpired() {

        std::cout << "Zoom identity expired" << std::endl;

    }

    void onZoomAuthIdentityExpired() {

        std::cout << "Zoom auth identity expired" << std::endl;

    }

    void Run() {

        int r = run();

        if (r != 0) {

          

        }

    }

    int run() {

        AuthContext authContext;

        std::string token = "xxxxxx";

        authContext.jwt_token = token.c_str();

        std::cout << "Using token: " << authContext.jwt_token << std::endl;

        // Create IAuthService object to perform Auth actions

        SDKError authCallReturnValue(SDKERR_UNAUTHENTICATION);

        SDKError errSetEvent = _authService->SetEvent(this);

        if (errSetEvent != SDKError::SDKERR_SUCCESS) {

            std::cout << "Failed to set authListener. " << errSetEvent

                      << std::endl;

            return 1;

        }

        authCallReturnValue = _authService->SDKAuth(authContext);

        if (authCallReturnValue != SDKError::SDKERR_SUCCESS) {

            std::cout << "Failed to auth SDK. " << authCallReturnValue

                      << std::endl;

            return 1;

        }

        return 0;

    }

    int join() {

        ZOOM_SDK_NAMESPACE::JoinParam joinParam;

        joinParam.userType = ZOOM_SDK_NAMESPACE::SDK_UT_WITHOUT_LOGIN;

        ZOOM_SDK_NAMESPACE::JoinParam4WithoutLogin &withoutloginParam =

            joinParam.param.withoutloginuserJoin;

        withoutloginParam.meetingNumber = _meetingNumber;

        withoutloginParam.vanityID = NULL;

        withoutloginParam.userName = "testing";

        withoutloginParam.psw = "";

        withoutloginParam.customer_key = NULL;

        withoutloginParam.webinarToken = NULL;

        withoutloginParam.isVideoOff = true;

        withoutloginParam.isAudioOff = false;

        SDKError joinErr = _meetingService->Join(joinParam);

        if (joinErr != SDKError::SDKERR_SUCCESS) {

            std::cout << "Failed to join meeting. " << joinErr << std::endl;

            return 1;

        }

        return 0;

    }

};

static Main *mainInstance = NULL;

void Run() { mainInstance->Run(); }

int main(int argc, char **argv) {

    mainInstance = new Main();

    Run();

    Display *display = XOpenDisplay(NULL);

    if (display == NULL) {

        return 1;

    }

    Window rootWindow = DefaultRootWindow(display);

    XEvent event;

    Atom wmDeleteMessage = XInternAtom(display, "WM_DELETE_WINDOW", False);

    while (true) {

      XNextEvent(display, &event);

      switch (event.type)

        {

            case Expose:

                printf("Expose\n");

                break;

            case ClientMessage:

                if (event.xclient.data.l[0] == wmDeleteMessage)

                break;

            default:

                break;

        }

    }

    XCloseDisplay(display);

    return 0;

}
there is my sample code,how can get the auth callback?

```

---

<div class="post-metadata">

**Author:** ![15107478682](https://avatars.discourse-cdn.com/v4/letter/1/bbce88/32.png) [@15107478682](https://devforum.zoom.us/u/15107478682)\
**Post date:** [October 17, 2023, 5:11am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/2 "2023-10-17T05:11:46Z")

</div>

> [@15107478682](#):
>
> `there is my sample code,how can get the auth callback?`

there is my sample code,how can get the auth callback?

---

<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:** [October 19, 2023, 12:52am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/3 "2023-10-19T00:52:17Z")

</div>

@15107478682

Do take a look at the sample code here

> **[GitHub - zoom/meetingsdk-linux-raw-recording-sample](https://github.com/zoom/meetingsdk-linux-raw-recording-sample)**
>
> Contribute to zoom/meetingsdk-linux-raw-recording-sample development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![15107478682](https://avatars.discourse-cdn.com/v4/letter/1/bbce88/32.png) [@15107478682](https://devforum.zoom.us/u/15107478682)\
**Post date:** [October 19, 2023, 2:37am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/4 "2023-10-19T02:37:12Z")

</div>

i try it, get this errror  
AuthSDK:success

Auth failed: 5

---

<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:** [October 19, 2023, 2:41am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/5 "2023-10-19T02:41:12Z")

</div>

@15107478682 did you put in the values in config.txt?

---

<div class="post-metadata">

**Author:** ![15107478682](https://avatars.discourse-cdn.com/v4/letter/1/bbce88/32.png) [@15107478682](https://devforum.zoom.us/u/15107478682)\
**Post date:** [October 19, 2023, 2:43am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/6 "2023-10-19T02:43:54Z")

</div>

yes ,i do it, token and meeting\_number and meeting\_password

---

<div class="post-metadata">

**Author:** ![15107478682](https://avatars.discourse-cdn.com/v4/letter/1/bbce88/32.png) [@15107478682](https://devforum.zoom.us/u/15107478682)\
**Post date:** [October 19, 2023, 2:46am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/7 "2023-10-19T02:46:06Z")

</div>

os is ubuntu22, 6.2.0-34-generic

---

<div class="post-metadata">

**Author:** ![15107478682](https://avatars.discourse-cdn.com/v4/letter/1/bbce88/32.png) [@15107478682](https://devforum.zoom.us/u/15107478682)\
**Post date:** [October 19, 2023, 2:54am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/9 "2023-10-19T02:54:30Z")

</div>

i put record\_toking same as token,the program in print  
AuthSDK:success

ALSA lib pcm\_dmix.c:1032:(snd\_pcm\_dmix\_open) unable to open slave

ALSA lib pcm\_dmix.c:1032:(snd\_pcm\_dmix\_open) unable to open slave

ALSA lib pcm\_dmix.c:1032:(snd\_pcm\_dmix\_open) unable to open slave

Auth failed: 5

---

<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:** [October 19, 2023, 3:12am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/10 "2023-10-19T03:12:40Z")

</div>

@15107478682 I’ve just tried the code from scratch and it works.

1. Pull the code from github.

2. Add h folder to demo/include

3. Add qt\_lib folder to demo/lib/zoom\_meeting\_sdk

4. Add these files to demo/lib/zoom\_meeting\_sdk  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/9/79ca382f409c693a6e98d45f9cc31f8d33b7e44e.png)

5. Generate a JWT token, and put it in `config.txt`

6. Add my own Meeting ID and password to `config.txt`

7. Do `cmake -B build` in /demo/ folder

8. Do `make` in /demo/build folder

9. Run `/demo/bin/meetingSDKDemo`

There might be additional steps needed if you are getting the ASLA error

```auto
apt-get install pulseaudio pulseaudio-util

# enable dbus
mkdir -p /var/run/dbus
dbus-uuidgen > /var/lib/dbus/machine-id
dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address

# add root
adduser root pulse-access
adduser root audio

# Cleanup to be "stateless" on startup, otherwise pulseaudio daemon can't start

rm -rf /var/run/pulse /var/lib/pulse /root/.config/pulse
cp /etc/pulse/* ~/.config/pulse/

pulseaudio -D --exit-idle-time=-1

# Create a virtual speaker output

pactl load-module module-null-sink sink_name=SpeakerOutput
pactl set-default-sink SpeakerOutput
pactl set-default-source SpeakerOutput.monitor

#make config file
mkdir ~/.config
echo -e "[General]\nsystem.audio.type=default" > ~/.config/zoomus.conf

```

---

<div class="post-metadata">

**Author:** ![15107478682](https://avatars.discourse-cdn.com/v4/letter/1/bbce88/32.png) [@15107478682](https://devforum.zoom.us/u/15107478682)\
**Post date:** [October 19, 2023, 3:25am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/11 "2023-10-19T03:25:59Z")

</div>

> [@chunsiong.zoom](#):
>
> `echo -e "[General]\nsystem.audio.type=default" > ~/.config/zoomus.conf`

i try it ,and there is no ASLA error,but auth callback is still 5, the 5 is mean?  
AuthSDK:success  
Auth failed: 5

---

<div class="post-metadata">

**Author:** ![15107478682](https://avatars.discourse-cdn.com/v4/letter/1/bbce88/32.png) [@15107478682](https://devforum.zoom.us/u/15107478682)\
**Post date:** [October 19, 2023, 3:30am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/12 "2023-10-19T03:30:16Z")

</div>

Can any logs indicate what happened here? AUTHRET\_UNKNOWN

---

<div class="post-metadata">

**Author:** ![15107478682](https://avatars.discourse-cdn.com/v4/letter/1/bbce88/32.png) [@15107478682](https://devforum.zoom.us/u/15107478682)\
**Post date:** [October 19, 2023, 3:41am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/13 "2023-10-19T03:41:57Z")

</div>

the sdk version zoom-meeting-sdk-linux\_x86\_64-5.16.2.8878

---

<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:** [October 19, 2023, 3:42am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/14 "2023-10-19T03:42:53Z")

</div>

I’ll PM you for your JWT token

---

<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:** [October 20, 2023, 3:06am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/15 "2023-10-20T03:06:24Z")

</div>

Update: issue resolved, restarting virtualbox resolved the error.

---

<div class="post-metadata">

**Author:** ![Hassan6](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hassan6/32/49432_2.png) [@Hassan6](https://devforum.zoom.us/u/Hassan6)\
**Post date:** [September 6, 2025, 11:04am UTC](https://devforum.zoom.us/t/linux-zoom-meeting-sdk-not-generating-authentication-return-callback/96888/16 "2025-09-06T11:04:02Z")

</div>

404 on linux meeting sdk sample repo
