Cydonia7
Cydonia7

Reputation: 3826

How can I create an XMPP account?

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 ?

Upvotes: 8

Views: 5297

Answers (2)

Zash
Zash

Reputation: 1626

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.

Upvotes: 6

ggozad
ggozad

Reputation: 13105

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.

Upvotes: 3

Related Questions