Skip to content
Jay edited this page Oct 22, 2020 · 19 revisions

Welcome to SupportPal PHP API Client Wiki.

In this wiki, we will cover installing and using the client, all endpoints available including samples, and advanced settings.

Requirements

The API client has the following system requirements:

  • PHP 7.2.5+

Installation

The API client can be installed using Composer:

composer require supportpal/api-client-php

Configuration

Using the API requires the API URL and an API token. The API URL is your help desk system URL (excluding the locale) appended with /api. In our example below, the system URL is https://www.example.com/support.

An API token can be generated by going to Settings -> General -> API Tokens in the operator panel. https://docs.supportpal.com/current/API+Tokens

$apiUrl = 'https://www.example.com/support/api';
$apiToken = 'JF9veGtKLw&8lVddyL9z14n&E3Y9JA65';

All supported API endpoints can be accessed through the getApi function.

$supportPal = new \SupportPal\ApiClient\SupportPal($apiUrl, $apiToken);
$api = $supportPal->getApi();