Hello, I'm trying to get list of registered users via xmpp protocol. In XEP-0133 is defined appropriate command but as I have read in
Thanks Petr
To access the most up-to-date ejabberd documentation, please visit docs.ejabberd.im »
Hello, I'm trying to get list of registered users via xmpp protocol. In XEP-0133 is defined appropriate command but as I have read in
Thanks Petr
Example to get registered accounts
Right, ejabberd implements a method different to the one described in XEP-0133.
If you send this query to ejabberd with an admin account:
<iq to='localhost' type='get'>
<query xmlns='http://jabber.org/protocol/disco#items' node='all users'/>
</iq>
The response is a list of registered accounts.
If the server has too many accounts, it returns instead groups of accounts:
<iq from='localhost' type='result' to='boss@localhost/Work'>
<query xmlns='http://jabber.org/protocol/disco#items' node='all users'>
<item name='__djni@localhost -- _pulic@localhost' node='all users/@1-116' jid='localhost'/>
<item name='_sya_@localhost -- avesus@localhost' node='all users/@117-232' jid='localhost'/>
...
In that case, you can query a specific group:
<iq to='localhost' type='get'>
<query xmlns='http://jabber.org/protocol/disco#items' node='all users/@929-1044'/>
</iq>
And the response includes the JIDs:
<iq from='localhost' type='result' to='boss@localhost/Work'>
<query xmlns='http://jabber.org/protocol/disco#items' node='all users/@929-1044'>
<item name='ccb3@localhost' jid='ccb3@localhost'/>
<item name='ccb4@localhost' jid='ccb4@localhost'/>
<item name='ccb5@localhost' jid='ccb5@localhost'/>
...
All this can be done easily with some Jabber clients like Psi and Tkabber, using their Service Discovery window.
Example to get registered accounts
What my name does in your example? Do you work at Russian Federal Security Service?
Do we need to give
Do we need to give permissions for admin users also??