Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I create an XMPP account?

Tags:

xmpp

I have a web application using XMPP for chatting. The only real problem is that users have to create their own XMPP account on the right server. I'd like to automate this process.

How do I automatically create a new XMPP account for a new user ? How do I know what address can be used or not for the account ?

like image 873
Cydonia7 Avatar asked Mar 01 '12 23:03

Cydonia7


2 Answers

There are a few different approaches:

  1. Have the client register in-band. They can then choose their username themselves.
  2. Connect to an existing user database, or interface with it directly.
  3. The server might have some CLI or Web-based management tool that can be used.
  4. As ggozad wrote, use the Add user command defined by Service Administration.
like image 128
Zash Avatar answered Nov 01 '22 16:11

Zash


You need to implement (and your server to support) XEP-0133 Service Administration and in particular the add user command. You can create random user ids or generate them with some logic and store them somehow to check for uniqueness. The get-registered-users command might also be of help.

like image 44
ggozad Avatar answered Nov 01 '22 15:11

ggozad