All URIs are relative to https://tripletex.no/v2
Method | HTTP request | Description |
---|---|---|
create | PUT /token/session/:create | Create session token. |
delete | DELETE /token/session/{token} | Delete session token. |
whoAmI | GET /token/session/>whoAmI | Find information about the current user. |
\Tripletex\Model\ResponseWrapperSessionToken create($consumer_token, $employee_token, $expiration_date)
Create session token.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Tripletex\Api\TokensessionApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$consumer_token = "consumer_token_example"; // string | Token of the API consumer
$employee_token = "employee_token_example"; // string | The employees token
$expiration_date = "expiration_date_example"; // string | Expiration date for the combined token
try {
$result = $apiInstance->create($consumer_token, $employee_token, $expiration_date);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TokensessionApi->create: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
consumer_token | string | Token of the API consumer | |
employee_token | string | The employees token | |
expiration_date | string | Expiration date for the combined token |
\Tripletex\Model\ResponseWrapperSessionToken
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete($token)
Delete session token.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\TokensessionApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$token = "token_example"; // string | The login token string to delete
try {
$apiInstance->delete($token);
} catch (Exception $e) {
echo 'Exception when calling TokensessionApi->delete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
token | string | The login token string to delete |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperLoggedInUserInfoDTO whoAmI($fields)
Find information about the current user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\TokensessionApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->whoAmI($fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TokensessionApi->whoAmI: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ResponseWrapperLoggedInUserInfoDTO
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]