MediaPost Social Network

up.auth.createToken

Creates an authentication token to be passed in as a parameter to community login page and then to up.auth.getSession after the user has logged in. The user must log in soon after you create this token.

Parameters

Type Name Required Description
string apiKey The application key associated with the calling application.
string community Community system name. Use up.community.getList method to retrieve available communities.
string apiSig ✔(production) An MD5 hash of the current request and your secret key, as described in the authentication guide.
string format Desired response format. Either XML (default), JSON or PHP serialized (xml, json, php_serial).
int expires Session lifetime in minutes. (0 - infinit session)

Example return XML

<?xml version="1.0" encoding="UTF-8"?>
<auth_createToken_response xmlns="http://api.universalplatform.com/">
 122ba2c40b54a450180ab5923ec02544d7d202
</auth_createToken_response>

Error codes

Code Description
1Internal error occured.
2Method was not provided.
94One of the parameters specified was missing or invalid.
95Invalid request signature.
97Invalid response format.
99Community is not provided.
100Invalid api key.
101Empty api key.
105Service is temporary unavailable.
112Method was not found.