PeopleAggregator API: method peopleaggregator.sendMessage

Arguments | Return value | REST (XML) example | REST (JSON) example | XML-RPC example

Method: peopleaggregator.sendMessage

Sends a private message to another user

Arguments (see also Authentication)

If calling by XML-RPC, note that this method takes a single struct as input, with the following keys:

authToken

Type: string
An authentication token
Example: as9d867f234o7asdf:928734982734987234:298374982734987234

recipients

Type: string
Comma-separated list of login names of message recipient
Example: myelin ,marc

title

Type: string
Message title
Example: This is a message

content

Type: string
Message body
Example: Hi... how are you?

Return value (see also Exceptions)

Type: hash

Attributes:

success

Type: boolean
true if the message was sent successfully, or false if an error occurred.
Example: True

Example REST (XML) request

Request

POST /api/xml/peopleaggregator/sendMessage HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 148

authToken=as9d867f234o7asdf%3A928734982734987234%3A298374982734987234&content=Hi...+how+are+you%3F&recipients=myelin+%2Cmarc&title=This+is+a+message

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 89

<response>
 <success>true</success>
</response>

Example REST (JSON) request

Request

POST /api/json/peopleaggregator/sendMessage HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 148

authToken=as9d867f234o7asdf%3A928734982734987234%3A298374982734987234&content=Hi...+how+are+you%3F&recipients=myelin+%2Cmarc&title=This+is+a+message

Response

HTTP/1.1 200 OK
Content-Type: application/x-javascript
Content-Length: 17

{"success": true}

Example XML-RPC call

Request

POST /api/xmlrpc HTTP/1.1
Content-Type: text/xml
Content-Length: 1610

<?xml version='1.0'?>
 <methodCall>
  <methodName>peopleaggregator.sendMessage</methodName>
  <params>
   <param>
    <value><struct>
     <member>
      <name>authToken</name>
      <value><string>as9d867f234o7asdf:928734982734987234:298374982734987234</string></value>
     </member>
     <member>
      <name>content</name>
      <value><string>Hi... how are you?</string></value>
     </member>
     <member>
      <name>recipients</name>
      <value><string>myelin ,marc</string></value>
     </member>
     <member>
      <name>title</name>
      <value><string>This is a message</string></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodCall>
 

Response

HTTP/1.1 200 OK
Content-Type: text/xml
Content-Length: 627

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><struct>
     <member>
      <name>success</name>
      <value><boolean>1</boolean></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodResponse>