+ trusted_network:
+ - allow: loopback
+ ## Do not establish S2S connections with bad servers
+ ## If you enable this you also have to uncomment "s2s_access: s2s"
+ ## s2s:
+ ## - deny:
+ ## - ip: "XXX.XXX.XXX.XXX/32"
+ ## - deny:
+ ## - ip: "XXX.XXX.XXX.XXX/32"
+ ## - allow
+
+## ===============
+## API PERMISSIONS
+## ===============
+##
+## This section allows you to define who and using what method
+## can execute commands offered by ejabberd.
+##
+## By default "console commands" section allow executing all commands
+## issued using ejabberdctl command, and "admin access" section allows
+## users in admin acl that connect from 127.0.0.1 to execute all
+## commands except start and stop with any available access method
+## (ejabberdctl, http-api, xmlrpc depending what is enabled on server).
+##
+## If you remove "console commands" there will be one added by
+## default allowing executing all commands, but if you just change
+## permissions in it, version from config file will be used instead
+## of default one.
+##
+api_permissions:
+ "console commands":
+ from:
+ - ejabberd_ctl
+ who: all
+ what: "*"
+ "admin access":
+ who:
+ - access:
+ - allow:
+ - acl: loopback
+ - acl: admin
+ - oauth:
+ - scope: "ejabberd:admin"
+ - access:
+ - allow:
+ - acl: loopback
+ - acl: admin
+ what:
+ - "*"
+ - "!stop"
+ - "!start"
+ "public commands":
+ who:
+ - ip: "127.0.0.1/8"
+ what:
+ - "status"
+ - "connected_users_number"