PHPackages                             shapin/talkjs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. shapin/talkjs

Abandoned → [carandclassic/talkjs](/?search=carandclassic%2Ftalkjs)ArchivedLibrary[API Development](/categories/api)

shapin/talkjs
=============

PHP client for talk.js API

v2.1.0(6y ago)4182.9k8[2 issues](https://github.com/shapintv/talkjs/issues)[1 PRs](https://github.com/shapintv/talkjs/pulls)MITPHPPHP ^7.3

Since Jun 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/shapintv/talkjs)[ Packagist](https://packagist.org/packages/shapin/talkjs)[ RSS](/packages/shapin-talkjs/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (5)Dependencies (5)Versions (6)Used By (0)

TalkJS PHP SDK
==============

[](#talkjs-php-sdk)

[![Latest version](https://camo.githubusercontent.com/612fad0fe2aa18d8981f3fce39ac22f1121901d23fcc31e0b7d34e60fcbe3bfb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f73686170696e74762f74616c6b6a732e7376673f7374796c653d666c61742d737175617265)](https://github.com/shapintv/talkjs/releases)[![Build status](https://camo.githubusercontent.com/2932206a332ef8ad3ca293011a74cbaa84ee37b1dbba6a8867c8e24dc1f169ab/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f73686170696e74762f74616c6b6a732e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.com/shapintv/talkjs)[![Total downloads](https://camo.githubusercontent.com/83551f5cc8342b7ebbc36bf009b872ea68325758a0826acca808f1f86314e2e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73686170696e2f74616c6b6a732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shapin/talkjs)

Note: This package is unmaintained. For further updates please see [carandclassic/talkjs](https://github.com/carandclassic/talkjs)
----------------------------------------------------------------------------------------------------------------------------------

[](#note-this-package-is-unmaintained-for-further-updates-please-see-carandclassictalkjs)

Install
-------

[](#install)

Via Composer

```
$ composer require shapin/talkjs
```

Usage
-----

[](#usage)

### Create a `TalkJSClient`

[](#create-a-talkjsclient)

```
use Shapin\TalkJS\TalkJSClient;
use Symfony\Component\HttpClient\HttpClient;

$httpClient = HttpClient::create([
    'base_uri' => 'https://api.talkjs.com/v1/'.self::APP_ID.'/',
    'auth_bearer' => self::SECRET_KEY,
    'headers' => [
        'Content-Type' => 'application/json',
    ],
]);

$talkJSClient = new TalkJSClient($httpClient);
```

IDs
---

[](#ids)

TalkJS IDs for users and conversations are custom and managed by your application.

Filtering
---------

[](#filtering)

All endpoints that fetch multiple records (users, conversations, messages) have limit &amp; pagination options. API usage below will use a $filters variable where possible for demonstration, and it will look like this:

```
$filters = [
    'limit' => 50,
    'startingAfter' => 'latestMessageId'
];
```

### Users

[](#users)

Please note TalkJS currently does not offer a user deletion API, and instead [recommend](https://talkjs.com/dashboard/tLjeWrEK/docs/Reference/REST_API/Users.html#page_Deleting-users) you use the update/edit endpoints to anonymise personally identifiable information.

```
// Create or update a user
$client->users()->createOrUpdate('my_custom_id', [
    'email' => 'georges@abitbol.com',
]);

// Retrieve a user
$user = $client->users()->get('my_custom_id');
```

### Conversations

[](#conversations)

```
// Create or update a conversation
$client->conversations()->createOrUpdate('my_custom_id', [
    'subject' => 'My new conversation',
    'participants' => ['my_user_id_1', 'my_user_id_2'],
    'welcomeMessages' => ['Welcome!'],
    'custom' => ['test' => 'test'],
    'photoUrl' => null
]);

// Retrieve a conversation
$conversation = $client->conversations()->get('my_custom_id');

// Find conversations
$conversations = $client->conversations()->find($filters);

// Join a conversation
$client->conversation()->join('my_conversation_id', 'my_user_id');

// Leave a conversation
$client->conversation()->leave('my_conversation_id', 'my_user_id');

// Update participation settings
$params = [
  'notify' => true, // Boolean, default true
  'access' => 'ReadWrite' // ReadWrite or Read, default ReadWrite
];
$client->conversations()->updateParticipation('my_conversation_id', 'my_user_id', $params);
```

Messages
--------

[](#messages)

For more information on custom data and filters, please refer to the TalkJS documentation linked above.

Please note:

- Sending file attachment is not implemented.
- Endpoints that return multiple messages will return them in descending order, i.e. latest first.

```
$custom = [
  'foo' => 'bar'
];
// Find Messages
$client->conversations()->findMessages('my_conversation_id', $filters);

// Post a system message
$client->conversations()->postSystemMessage('my_conversation_id', 'message_text', $custom);

// Post a user message
$client->conversations()->postUserMessage('my_conversation_id', 'my_user_id', 'message_text', $custom);
```

### Integration with Symfony

[](#integration-with-symfony)

Create a new HttpClient:

```
framework:
    http_client:
        scoped_clients:
            talkjs.client:
                auth_bearer: '%env(TALKJS_SECRET_KEY)%'
                base_uri: 'https://api.talkjs.com/v1/%env(TALKJS_APP_ID)%/'
                headers:
                    'Content-Type': 'application/json'
```

Then create your service:

```
services:
    Shapin\TalkJS\TalkJSClient: ~
```

You're done!

One day, I may consider creating a bundle in order to bootstrap this SDK...

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~54 days

Total

5

Last Release

2311d ago

Major Versions

v1.0.0 → v2.0.02019-06-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/6662493c184b0ed32978349f4162cac376a2e1026c7f3a06cf1a9565867ecf15?d=identicon)[odolbeau](/maintainers/odolbeau)

---

Top Contributors

[![dannyyassine-ce](https://avatars.githubusercontent.com/u/91279213?v=4)](https://github.com/dannyyassine-ce "dannyyassine-ce (1 commits)")

---

Tags

sdktalkjstalkjs-php-sdkapichattalktalkjs

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shapin-talkjs/health.svg)

```
[![Health](https://phpackages.com/badges/shapin-talkjs/health.svg)](https://phpackages.com/packages/shapin-talkjs)
```

###  Alternatives

[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[openai-php/symfony

Symfony Bundle for OpenAI

215715.5k3](/packages/openai-php-symfony)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[smnandre/pagespeed-api

PageSpeed Insight PHP Api Client 🚀 Analyse web pages for performances metrics, core web vitals...

1511.5k](/packages/smnandre-pagespeed-api)[google-gemini-php/symfony

Symfony Bundle for Gemini

149.4k1](/packages/google-gemini-php-symfony)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
