Pusher Chatkit PHP SDK

1.9.0 2019-12-11 16:26 UTC


Read the docs Twitter GitHub license PHP version

Find out more about Chatkit here.


We recommend you use composer.

You can get the Chatkit PHP SDK via a composer package called pusher-chatkit-server. See https://packagist.org/packages/pusher/pusher-chatkit-server

$ composer require pusher/pusher-chatkit-server

Or add to composer.json:

"require": {
    "pusher/pusher-chatkit-server": "^1.1.0"

and then run composer update.

Or you can clone or download the SDK files.

This SDK depends on PHP modules for cURL and JSON. See cURL module installation instructions and JSON module installation instructions.

Deprecated versions

Versions of the library below 1.0.0 are deprecated and support for them will soon be dropped.

It is highly recommended that you upgrade to the latest version if you're on an older version. To view a list of changes, please refer to the CHANGELOG.

Getting started

Head over to our documentation.

Running tests

WARNING Executing these tests will issue real requests to the configured Chatkit instance, some of which may be destructive. You should NOT run against a live production instance.

Install PHPUnit.

Ensure dependencies are up to date:

composer update

Set instance locator and secret key environment variables (available in the dashboard at dash.pusher.com):

export CHATKIT_INSTANCE_LOCATOR="v1:us1:89755518-5782-413d-9446-0d2726dd1e5a"
export CHATKIT_INSTANCE_KEY="2a188376-d4f0-47fa-8954-dd08115ea98c:NDk5YTZkOTgtMzk2ZC00NDlhLTg1MTYtYjNhODYzYWNiMjczCg="

Execute tests against a Chatkit instance:


Release process

  1. Update the CHANGELOG
  2. On Git, tag with the new version and push Packagist automatically releases new versions of the library upon detecting a new Github release.