Quintin Par
Quintin Par

Reputation: 16252

Ejabberd, Python: Check user, if not create

Is it possible to talk to an Ejabberd interface from python through and xmpp client like sleekxmpp to create a user if it does not exist?

Can someone advice the best approach?

Upvotes: 2

Views: 1092

Answers (2)

ggozad
ggozad

Reputation: 13105

If Twisted is an option for you, you can adapt my jarn.xmpp.twisted to your needs. It makes use of XEP-0133 Service Administration. The relevant pieces can be found in protocols.py.

Upvotes: 0

Mickaël Rémond
Mickaël Rémond

Reputation: 9055

Did you check in-band registration already ? The specification is here: http://xmpp.org/extensions/xep-0077.html

If you configure ejabberd to allow in-band registration, then your client will be able to create an account if it does not exist yet.

Upvotes: 1

Related Questions