Generates a unique, self-expiring time token that can be used to authenticate a series of API calls performed by a user within a given time frame.
See moreValidates a unique, self-expiring time token that can be used to authenticate that a series of API calls is performed by a user within a given time frame.
See moreToken: Get
The data to be submitted to the API is composed of the following fields:
field | Example | Note | ||||
---|---|---|---|---|---|---|
API | 1.5 | |||||
user_id | john1970 | Required | ||||
user_api_key | 1959caadac9b13dcb3 | Required | ||||
account_id | greatwidgets | Required | ||||
type | generate_time_token | Required | ||||
token_interval | 60 | Optional | ||||
Output Format: | ||||||
output | JSON or XML | Optional. If not provided, defaults to XML | ||||
callback | someFunctionName | Optional: JSONP format | ||||
condensed | yes | Optional (No white space) Applies only to JSON(P) output |
NOTE:
Example PHP Request:
If you are using PHP, the $data array would look like this:
$data['API'] = '1.5';
$data['user_id'] = 'john1970';
$data['user_api_key'] = '1959caadac9b13dcb3';
$data['account_id'] = 'greatwidgets';
$data['type'] = 'generate_time_token';
$data['token_interval'] = '86400';
Success XML Response:
<response status="success">
<token>CHFBTABPGWGBRLCKETCKGDDKEAFFBBFBETTI</token>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Token: Validate
The data to be submitted to the API is composed of the following fields:
field | Example | Note | ||||
---|---|---|---|---|---|---|
API | 1.5 | |||||
user_id | john1970 | Required | ||||
user_api_key | 1959caadac9b13dcb3 | Required | ||||
account_id | greatwidgets | Required | ||||
type | validate_time_token | Required | ||||
token | CHFBTABPGWGBRLCKETCKG | Required | ||||
Output Format: | ||||||
output | JSON or XML | Optional. If not provided, defaults to XML | ||||
callback | someFunctionName | Optional: JSONP format | ||||
condensed | yes | Optional (No white space) Applies only to JSON(P) output |
NOTE:
Example PHP Request:
If you are using PHP, the $data array would look like this:
$data['API'] = '1.5';
$data['user_id'] = 'john1970';
$data['user_api_key'] = '1959caadac9b13dcb3';
$data['account_id'] = 'greatwidgets';
$data['type'] = 'validate_time_token';
$data['token'] = 'CHFBTABPGWGBRLCKETCKG';
Success XML Response:
<response status="valid">
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>