Waiting for host message does not appear even after setting up config and sending jwt to iframe

I have setup jitsi meet on private server and have done the setup for jwt tokens. I am using jitsi iframe to open the meet. It is working properly for moderator (when i pass jwt). But for users, if I dont pass token, they are neither able to enter the meet nor getting the wait for host message. If i pass token for users, they are able to join. Please help me out with this.

You need to set the following in your prosody config:

allow_empty_token = true

yourdomain.cfg.lua
Is this the prosody config file?

Yes
In the main VirtualHost block where you set authentication as “tokens”, you should have that line to allow empty tokens.

But wont it affect security of the meet?
I am looking for some solution where in only if moderator joins then participants can join.
Can you help me with this?

The following plugins may help:

token_affiliation
token_owner_party

as a new alternative you may check also: eparto.net

It is possible to create invites for scheduled meetings. For examples:
invite for host participant
invite for guest participant

Thank you, I will try this.

I have one more query, in iframe i tried using api
var api = new JitsiMeetExternalAPI(domain, options);
api.on(‘participantLeft’, (id) => {
console.log(id)
})

But this does not give the id of person which has left the meeting. It gives some other person’s id. Any idea on this?

No idea about it. It may be the message id

I see the same ID that is received in ParticipantJoined.

No its not the same id. I want to track when moderator has left the meeting. One possible way i found was using
api.on(‘participantLeft’, (id)…
But when moderator leaves, it gives ID of a person who is still inside a meet.
Can you tell alternative of how I can track if moderator has left?

if you use iFrame Api to create a room, you see the room from the point of view of its owner. You don’t see the own user enter and leave the room as a participant, since there are conferencejoined and conferenceleft events for that.
If you join an existing room with the iFrame Api, you will see a participantleft if the room’s owner leaves, but obviously you will not see a participantjoined since the room is already created when you enter.
That’s the way the iFrame Api works. It don’t give you an overarching view of a conference, it’s managed from the point of view of a user - even the owner.

What is the possible way of knowing that moderator has left. Because only when moderator leaves, I want to redirect it to some other page. Please help me with this.

there was a hack posted on this forum to redirect when all moderator have left, but it involved a prosody module (but if you have your own Jitsi server it’s not a real problem). Here it is, and the module itself is posted in the same thread.

Thank you