ejabberd - Comments for "how to get list of registered users" https://www.ejabberd.im/node/3420 en Example to get registered accounts https://www.ejabberd.im/node/3420#comment-65210 <p>What my name does in your example? Do you work at Russian Federal Security Service?</p> Wed, 21 Jan 2015 07:11:42 +0000 avesus comment 65210 at https://www.ejabberd.im Do we need to give https://www.ejabberd.im/node/3420#comment-64870 <p>Do we need to give permissions for admin users also??</p> Fri, 22 Aug 2014 06:36:01 +0000 mayurs.narole comment 64870 at https://www.ejabberd.im Example to get registered accounts https://www.ejabberd.im/node/3420#comment-54070 <p>Right, ejabberd implements a method different to the one described in XEP-0133.</p> <p>If you send this query to ejabberd with an admin account:</p> <div class="codeblock"><code>&lt;iq to=&#039;localhost&#039; type=&#039;get&#039;&gt;<br />&nbsp; &lt;query xmlns=&#039;http://jabber.org/protocol/disco#items&#039; node=&#039;all users&#039;/&gt;<br />&lt;/iq&gt;</code></div> <p>The response is a list of registered accounts.</p> <p>If the server has too many accounts, it returns instead groups of accounts:</p> <div class="codeblock"><code>&lt;iq from=&#039;localhost&#039; type=&#039;result&#039; to=&#039;boss@localhost/Work&#039;&gt;<br />&nbsp; &lt;query xmlns=&#039;http://jabber.org/protocol/disco#items&#039; node=&#039;all users&#039;&gt;<br />&nbsp;&nbsp;&nbsp; &lt;item name=&#039;__djni@localhost -- _pulic@localhost&#039; node=&#039;all users/@1-116&#039; jid=&#039;localhost&#039;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;item name=&#039;_sya_@localhost -- avesus@localhost&#039; node=&#039;all users/@117-232&#039; jid=&#039;localhost&#039;/&gt;<br />...</code></div> <p>In that case, you can query a specific group:</p> <div class="codeblock"><code>&lt;iq to=&#039;localhost&#039; type=&#039;get&#039;&gt;<br />&nbsp; &lt;query xmlns=&#039;http://jabber.org/protocol/disco#items&#039; node=&#039;all users/@929-1044&#039;/&gt;<br />&lt;/iq&gt;</code></div> <p>And the response includes the JIDs:</p> <div class="codeblock"><code>&lt;iq from=&#039;localhost&#039; type=&#039;result&#039; to=&#039;boss@localhost/Work&#039;&gt;<br />&nbsp; &lt;query xmlns=&#039;http://jabber.org/protocol/disco#items&#039; node=&#039;all users/@929-1044&#039;&gt;<br />&nbsp;&nbsp;&nbsp; &lt;item name=&#039;ccb3@localhost&#039; jid=&#039;ccb3@localhost&#039;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;item name=&#039;ccb4@localhost&#039; jid=&#039;ccb4@localhost&#039;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;item name=&#039;ccb5@localhost&#039; jid=&#039;ccb5@localhost&#039;/&gt;<br />...</code></div> <p>All this can be done easily with some Jabber clients like Psi and Tkabber, using their Service Discovery window.</p> Thu, 12 Mar 2009 20:22:17 +0000 mfoss comment 54070 at https://www.ejabberd.im