Tag Archives: kayako php

Kayako PHP API library for Kayako Fusion RESTful API

kayako php api

I personally found the official  Kayako PHP API library 1.1.0 for Kayako Forge quite disappointing. It reminded really on the auto-generated SOAP connectors in Java with the only difference that since it is REST web service there is no way to be sure that the library version that you have will match the one on your Kayako installation.

The official Kayako PHP API quite reminded my on the auto-generated SOAP, with the only difference that the Kayako one isn’t auto-generated.

Some background on auto-generated connectors. They are generated based on the SOAP WSDL descriptors and therefore they are normally slightly large, complicated and messy.  The positive part in them is the reassurance that the connector is going to work with exactly that web service structure that you have installed.

In REST services unfortunately there are no descriptors so it is not possible for you to generated something based on your web service structure.

I find the official Kayako PHP API library poorly designed, because:

  • There are thousands of classes and nestings throughout the library.

That makes the easy web service functionality to look extremely complicated, confusing and uncompromisable.

  • The library constantly throws E_STRICT exceptions due mismatch between the abstract Base class constructors and the classes extended from them.

Normally when one makes library all exceptions should be accepted, because you don’t know what are the error settings of the systems which this library will be integrated in.

  • There are too many specific static variables in the different classes which are hard-coded to the actual web service values.

I found that not only confusing but also a potential for a lot of problems.

The Kayako PHP API solution that I used

 

After spending the better part of the day in different ways to making that delicious treat to work I just decided to make a really light Kayako PHP API library on my own.

Git repository – https://github.com/ki6i/kayako_api

This Kayako PHP API library is built with the same design used in the official Mandrill PHP library. It aims to spare you redeclaring all keys and HTTP related setting.

If you want to read more about the Kayako Fusion RESTful API and the official Kayako PHP API, here is the documentation: http://wiki.kayako.com/display/DEV/REST+-+TicketSearch