Skip to content

access_mode_set

Switch the server to a different access mode. The new mode applies to the next authentication; connected users stay connected.

{ "cmd": "access_mode_set", "mode": "invite" }
Field Type Required Description
mode string Yes One of open, whitelist, password, application, or invite. password needs a server password set first.
{ "cmd": "access_mode_set", "mode": "invite" }

Every other authenticated connection receives:

{ "cmd": "access_mode_update", "mode": "invite" }

The change is recorded in the audit log with the old and new mode. Setting the mode it already has still succeeds, broadcasts, and logs.

Requires manage_access. A user in timeout gets a rate_limit frame instead.

val When
Mode must be one of: open, whitelist, password, application, invite mode isn’t a known mode.
Set a server password before enabling password mode (use server_password_set) mode is password and no password is set.
Failed to set access mode to '<mode>' The server couldn’t save the change.

A missing or non-string mode returns the schema validator’s message.