Infinite loading when joining meeting from meeting sdk for web js method

Meeting SDK Type and Version: web, latest

Description
We have a SSR php application. We want to have the zoom meeting viewer embedded in our app (inside a page, so that we stay on our domain).
Currently, the viewer is “working”, by which, I mean that it displays, and permits us to join a meeting, set video/mic.
The issue is that once we join, we have an infinite “joining the meeting” message and loading.

Error?
1: In the browser’s console, we have “join invalid parameter !!!”, but I followed this documentation and have the same parameters: Meeting SDK - web - client view - Meetings
2: Impossible to join the meeting, stuck on loading
3. I also get those in the console:

{
    "type": "AUDIO",
    "evt": "ERROR",
    "errorCode": "NOT_CONNECTED"
}
{
    "type": "VIDEO",
    "evt": "ERROR",
    "errorCode": "NOT_CONNECTED"
}

Troubleshooting Routes
From my zoom account, I went on our meetings list, from there I can start meetings without issue, but they start in my computer’s zoom app. This tells me the issue is with ZoomMtg, which we are using.

First, to create the meetings, we get our bearer token from this route: https://zoom.us/oauth/token. I followed the documentation from “Server-to-server oauth” to do this. Once I have the bearer token, I use it to create the meetings with the following settings:

'start_time' => $params['start'],
                'password' => $params['passcode'],
                'topic' => $params['title'],
                'duration' => $params['duration'],
                'type' => 2,
                'settings' => [
                    'waiting_room' => false,
                    'host_video' => true,
                    'participant_video' => true,
                    'join_before_host' => true,
                    'mute_upon_entry' => false,
                    'waiting_room' => false,
                    'jbh_time' => 0
                ]

Remember, the creation of meetings work since I can start them in the app.

When trying to join meetings, we use meeting sdk for web:

 ZoomMtg.init({
        leaveUrl: meetConfig.leaveUrl,
        debug: true,
        showMeetingHeader: false,
        disableInvite: true,
        disableCallOut: false,
        disableRecord: false,
        disableJoinAudio: false,
        audioPanelAlwaysOpen: true,
        showPureSharingContent: false,
        isSupportAV: true,
        isSupportChat: true,
        isSupportQA: true,
        isSupportPolling: true,
        isSupportBreakout: true,
        isSupportCC: true,
        screenShare: true,
        rwcBackup: '',
        videoDrag: true,
        sharingMode: 'both',
        videoHeader: true,
        isLockBottom: true,
        isSupportNonverbal: true,
        isShowJoiningErrorDialog: true,
        inviteUrlFormat: '',
        disableVoIP: false,
        disableReport: false,
        loginWindow: {width: 400, height: 380},
        meetingInfo: ['topic', 'participant', 'enctype', 'report'],
        success: function (res) {
            ZoomMtg.join({
                sdkKey: meetConfig.apiKey,
                signature: meetConfig.signature,
                zak: meetConfig.zakToken,
                meetingNumber: meetConfig.meetingNumber,
                userName: meetConfig.userName,
                passWord: meetConfig.passWord,
                success: function (res) {
                    console.log("SUCCESS: ", res);
                },
                error: function (res) {
                    console.log("ERROR: ", res);
                }
            });

        },
        error: function (res) {
        }
    });

Our context
All meetings are created with out account as the host, we have a “Concurrent meetings plus” liscense, but the host might never join a meeting, so anyone that can join should be able to whenever.

My questions

  1. For our context, since the host might never join, do we need the “zak” parameter?
  2. Is there a difference to be made between starting and joining a meeting? If yes, the should I do the ZoomMtg.join twice?
  3. when should I use my sdk_key and sdk_secret over client_id and client_secret (all come from the credentiald of my meeting sdk integration)
  4. Did I need to use server-to-server auth?
  1. For our context, since the host might never join, do we need the “zak” parameter?

Yes, you will need to join with the host’s ZAK token.

  1. Is there a difference to be made between starting and joining a meeting? If yes, the should I do the ZoomMtg.join twice?

Starting meeting means “Starting meeting as host”
Joining meeting means “Joining as participant”
You just need to do either.

  1. when should I use my sdk_key and sdk_secret over client_id and client_secret (all come from the credentiald of my meeting sdk integration)

If you see both sdkkey+sdksecret and clientid+clientsecret on your meeting SDK app credentials, you can choose to use either of them.

  1. Did I need to use server-to-server auth?

If you need account-level access and building an internal app, you can use S2S Oauth app type.