For third-party applications to interact with EddyDesk, an API (application programming interface, API) has been developed. Using a set of functions, it is possible to work with both users of your system and with requests.
To start working with the API, go through "Management" to the "Global settings" section, where you will find the API key in the "System" subsection. This key is used as the primary method of authorization in the system (using the API). You can generate a new key if necessary:
All documentation is available by link.
An example of the "Get requests" method with GuzzleHttp:
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://domain.helpdeskeddy.com/',
]);
try {
$response = $client->get('api/v2/tickets/',
[
'auth' => [
'example@example.com',
'api-key',
],
]);
print_r(json_decode($response->getBody()->getContents(), true));
} catch (GuzzleHttp\Exception\ClientException $e) {
$response = $e->getResponse();
print_r($response->getBody()->getContents());
}
?>