PeopleAggregator API: method peopleaggregator.joinGroup

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

Method: peopleaggregator.joinGroup

Joins a user to a group.

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: 123576abcdef6572134

id

Type: string
ID of the group to join
Example: group:1234

Return value (see also Exceptions)

Type: hash

Attributes:

success

Type: boolean
true if you have successfully joined the group or your application has been sent to a moderator, or false if you were already joined, or are not permitted to join
Example: True

joinState

Type: enum
'joined' if you were able to join the group immediately. 'in_moderation' if your application has been sent to a moderator.
Allowed values: joined, in_moderation
Example: joined

Example REST (XML) request

Request

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

authToken=123576abcdef6572134&id=group%3A1234

Response

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

<response>
 <joinState>joined</joinState>
 <success>true</success>
</response>

Example REST (JSON) request

Request

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

authToken=123576abcdef6572134&id=group%3A1234

Response

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

{"joinState": "joined", "success": true}

Example XML-RPC call

Request

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

<?xml version='1.0'?>
 <methodCall>
  <methodName>peopleaggregator.joinGroup</methodName>
  <params>
   <param>
    <value><struct>
     <member>
      <name>authToken</name>
      <value><string>123576abcdef6572134</string></value>
     </member>
     <member>
      <name>id</name>
      <value><string>group:1234</string></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodCall>
 

Response

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

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