How to prompt password required for room

Hi:

I am testing the lib-jitsi-meet api for a custom GUI, and i have the next problem.
I create a room and then lock with the api room.lock(“pass”) command. That works perfect but now I can not find the way to prompt new users for the password. I try with this events:

room.on(
JitsiMeetJS.errors.conference.PASSWORD_REQUIRED,
() => console.log(‘set pass to join’));

room.addEventListener(
JitsiMeetJS.errors.conference.PASSWORD_REQUIRED,
() => console.log(‘set pass to join’));

even

connection.addEventListener(
JitsiMeetJS.errors.connection.PASSWORD_REQUIRED,
function (){
console.log(“set pass to join”)
});

connection.addEventListener(
JitsiMeetJS.errors.conference.PASSWORD_REQUIRED,
function (){
console.log(“set pass to join”)
});

but never executes the listener.
What am I doing wrong?
Thanks so much.