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