I've installed ejabberd 2.1.11.
To build module, I used ejabberd 2.1.11 source code and 0.1.x branch.
And I've done all settings as same as in ReadMe.
But when I send request to mod_restful_register, I got 401 error.
The followings are my configuration.
{{8088,{0,0,0,0}}, ejabberd_http, [
{request_handlers,
[
{["api"], mod_restful}
]}
]}
{mod_restful, [
{api,
[
{["admin"], mod_restful_admin, [
{key, "secret"},
{allowed_commands, [register, unregister]}
]},
{["register"], mod_restful_register, [{key, "secret"}]}
]}
And here is the post request I sent.
URL: http://messaging.goldenspear.com:8088/api/register/register
params: {
"key": "secret",
"username": "newuser",
"host": "localhost",
"password": "newuser"
}
But it returns 401 Unauthorized error.
Also Get request is_registered returns 401 error.
Please let me know what I've done wrong.
I've installed ejabberd 2.1.11. To build module, I used ejabberd 2.1.11 source code and 0.1.x branch. And I've done all settings as same as in ReadMe. But when I send request to mod_restful_register, I got 401 error. The followings are my configuration. {{8088,{0,0,0,0}}, ejabberd_http, [ {request_handlers, [ {["api"], mod_restful} ]} ]}
{mod_restful, [ {api, [ {["admin"], mod_restful_admin, [ {key, "secret"}, {allowed_commands, [register, unregister]} ]}, {["register"], mod_restful_register, [{key, "secret"}]} ]} And here is the post request I sent. URL: http://messaging.goldenspear.com:8088/api/register/register params: { "key": "secret", "username": "newuser", "host": "localhost", "password": "newuser" } But it returns 401 Unauthorized error. Also Get request is_registered returns 401 error. Please let me know what I've done wrong.