powered by Jive Software

UserService Plugin extension

I want to be able to send messages from external application via http request to users, so I ‘merged’ UserService and Subscription plugins. With this modification userService can send messages to users. All you need to do is to build correct http request in your application.

  • Note that I’m NOT a Java programmer at all!

  • In order to use this modification You need to reinstall userService Plugin.

  • No error handling at all.

New parameters were added:


sender of message

OF version


recipient of message



subject of message



body (text) of message



some valid username


Example query 3.6+ :

http://example.com:9090/plugins/userService/userservice?secret=bigsecret&type=se ndmsg&sender=admin1&recipient=user1&subject=test_msg&msg=my_important_message

Example query 3.7+ :

http://example.com:9090/plugins/userService/userservice?secret=bigsecret&type=se ndmsg&sender=admin1&recipient=user1&subject=test_msg&msg=my_important_message&us ername=sysuser1

All parameters can be sent via HTTP POST or GET methods in single query. As example sender,recipient and subject via http GET, msg via POST method.

Note: In order to send big (more than ~2k) messages you need to use POST method for msg parameter. You need to urlencode() some or all of values!

An example usage is intranet web application that sends message to user when someone open a link. Simple PHP example:

// OF server address
$postdata = http_build_query(
             'type'        => 'sendmsg',
             'secret'        => 'bigsecret',
             'username'     => 'sysuser1',                 'msg'         => 'Call me ASAP',
             'sender'        => 'admin1',
             'recipient'    => 'user1',
             'subject'        => 'URGENT'
$opts = array('http' =>
            'method'  => 'POST',
            'header'  => 'Content-type: application/x-www-form-urlencoded',
            'content' => $postdata
$context  = stream_context_create($opts);
//Send message & Get result
$line = file_get_contents($jserver, false, $context);
//Check result
if (!(stripos($line, "<result>ok</result>") === false)){Do something - message sent}

Here is a small PHP Class to send messages using your plugin.

Sorry but i have no a lot time and added some of POST data.