PeopleAggregator API: method peopleaggregator.checkToken

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

Method: peopleaggregator.checkToken

Indicates whether a token is valid or not

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

Return value (see also Exceptions)

Type: hash

Attributes:

success

Type: boolean
True if the token is valid, false otherwise
Example: True

login

Type: string
The login name of the user for which this token is valid
Example: marc

tokenLifetime

Type: int
The number of seconds for which the token is still valid.
Example: 86001

Example REST (XML) request

Request

Response

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

<response>
 <login>marc</login>
 <success>true</success>
 <tokenLifetime>86001</tokenLifetime>
</response>

Example REST (JSON) request

Request

Response

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

{"login": "marc", "success": true, "tokenLifetime": 86001}

Example XML-RPC call

Request

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

<?xml version='1.0'?>
 <methodCall>
  <methodName>peopleaggregator.checkToken</methodName>
  <params>
   <param>
    <value><struct>
     <member>
      <name>authToken</name>
      <value><string>as9d867f234o7asdf:928734982734987234:298374982734987234</string></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodCall>
 

Response

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

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><struct>
     <member>
      <name>login</name>
      <value><string>marc</string></value>
     </member>
     <member>
      <name>success</name>
      <value><boolean>1</boolean></value>
     </member>
     <member>
      <name>tokenLifetime</name>
      <value><int>86001</int></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodResponse>