Hi @Redeyes, I am successfully using the REST API for creating (Openfire 3.9.3) for creating users except the following case:
When I create a user which includes a @ in the user’s jid node then I get an error 500
This is clearly supported by Openfire since the Web Admin Interface I can create a user like test@example.com@example.com (XEP 0106 in play here)
The question here is whether I am doing something wrong (I have tried substituting @ with %40 but to no effect) here, or there is an issue why the url encoding of the jids. When setting the email value this works perfectly well, so this is something specific to Jid node.
According to XEP-0106: JID Escaping this is perfectly legal. Also OpenFire, supporting XEP0106, allows the creation of users with such node jids, from the Web Admin Tool. My business case also requires such Jids (or I will have to perform some mapping of emails to jid nodes…)
Having said that, offering XEP-0106 compatible support to the REST API would be great!
You are using the wrong escape character. Use \40 instead of %40. The old user service plugin did accept escaping. I create user names with embedded @ character all the time. For example, user\40company@myservice.net
Correct for REST API. However I had a little trouble when using it with the PHP-Openfire REST-API class for PHP. The solution there was to escape also the , so the escape character for @, should be \40, for gidkom/php-openfire-restapi · GitHub