8

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 ?

Flow
  • 23,572
  • 15
  • 99
  • 156
Cydonia7
  • 3,744
  • 2
  • 23
  • 32

2 Answers2

6

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.
Zash
  • 1,636
  • 9
  • 12
3

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.

ggozad
  • 13,105
  • 3
  • 40
  • 49