Setting Default Password on room using API

Hi everyone, I have entered jitsi in my web-app. Is it possible to set a default password when opening a meeting with the API?
Thanks to those who will be able to help me. :grinning:

// set new password for channel
api.addEventListener('participantRoleChanged', function(event) {
    if (event.role === "moderator") {
        api.executeCommand('password', 'The Password');
// join a protected channel
api.on('passwordRequired', function ()
    api.executeCommand('password', 'The Password');
1 Like

Thank you very much. It works!!! :call_me_hand: