1. Go to this page and download the library: Download innovaat/topdesk-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
innovaat / topdesk-api example snippets
// Create a new API instance, endpoint should end on "/tas/".
$api = new \Innovaat\Topdesk\Api('https://partnerships.topdesk.net/tas/');
// LEGACY LOGIN WITH TOKEN
$api->useLogin('yourusername', 'yourpassword', function($token) {
// Callback function that receives a single parameter `$token` for you to persist.
// It should return the persisted token as well.
if($token) {
file_put_contents('token.txt', $token);
}
return file_exists('token.txt') ? file_get_contents('token.txt') : null;
});
$api->request('GET', 'api/incidents/call_types', [
// Optional array to be sent as JSON body (for POST/PUT requests).
], [
// Optional (search) query parameters, see API documentation for supported values.
], [
// Optional parameters for the Guzzle request itself.
// @see http://docs.guzzlephp.org/en/stable/request-options.html
])
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.