PHPackages                             gestixi/php-matrix-sdk - 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. gestixi/php-matrix-sdk

ActiveLibrary

gestixi/php-matrix-sdk
======================

PHP SDK for interacting with Matrix/Synapse.

1.0.0(3mo ago)0217↓50%MITPHPPHP ~7.4|^8

Since Feb 11Pushed 3mo agoCompare

[ Source](https://github.com/gestixi/php-matrix-sdk)[ Packagist](https://packagist.org/packages/gestixi/php-matrix-sdk)[ Docs](https://github.com/gestixi/php-matrix-sdk)[ RSS](/packages/gestixi-php-matrix-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Matrix client SDK for PHP
=========================

[](#matrix-client-sdk-for-php)

This package is a fork of the now-abandoned original by [Yoann Celton](https://github.com/Aryess). The architecture does not necessarily reflect best practice in the eyes of current maintainers. Incremental improvements are made as time and resources allow. Contributions are welcome.

---

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Software Version](https://camo.githubusercontent.com/342b88be33f92a07897a847d3c83cfa7dae5fbe7a1daca364895c4ea34616fc4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676573746978692f7068702d6d61747269782d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gestixi/php-matrix-sdk)[![Software License](https://camo.githubusercontent.com/71c15c533d491c6639e44579b71d10a70a91a1f1d888121dcb8f25724ee6ab36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676573746978692f7068702d6d61747269782d73646b2e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/71c15c533d491c6639e44579b71d10a70a91a1f1d888121dcb8f25724ee6ab36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676573746978692f7068702d6d61747269782d73646b2e7376673f7374796c653d666c61742d737175617265)

This is a Matrix client-server SDK for php 7.4+, initially copied from [matrix-org/matrix-python-sdk](https://github.com/matrix-org/matrix-python-sdk).

This package is still a work in progress, and at the current time, not everything has been ported:

- Missing E2E encryption, need php bindings for the OLM library
- Live sync
- Unit tests for the client

Installation
------------

[](#installation)

```
composer require gestixi/php-matrix-sdk

```

Usage
-----

[](#usage)

Client:

```
require('vendor/autoload.php');
use MatrixPhp\MatrixClient;

$client = new MatrixClient("http://localhost:8008");

// New user
$token = $client->registerWithPassword("foobar", "monkey");

// Existing user
$token = $client->login("foobar", "monkey");

$room = $client->createRoom("my_room_alias");
$room->sendText("Hello!");
```

API:

```
require('vendor/autoload.php');
use MatrixPhp\MatrixHttpApi;

$matrix = new MatrixHttpApi("http://localhost:8008", $sometoken);

$response = $matrix->sendMessage("!roomid:matrix.org", "Hello!");
```

\##Structure The SDK is split into two modules: `api` and `client`.

\###API This contains the raw HTTP API calls and has minimal business logic. You can set the access token (`token`) to use for requests as well as set a custom transaction ID (`txn_id`) which will be incremented for each request.

\###Client This encapsulates the API module and provides object models such as `Room`.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Brad Jones](https://github.com/bradjones1) at [Meet Kinksters](https://tech.kinksters.dating)
- [Yoann Celton](https://github.com/Aryess) (initial port)
- [All Contributors](https://github.com/gestixi/php-matrix-sdk/graphs/contributors)

License
-------

[](#license)

[MIT License](LICENSE.md).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance82

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor3

3 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

93d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5174161?v=4)[GestiXi](/maintainers/gestixi)[@gestixi](https://github.com/gestixi)

---

Top Contributors

[![philsturgeon](https://avatars.githubusercontent.com/u/67381?v=4)](https://github.com/philsturgeon "philsturgeon (49 commits)")[![frankdejonge](https://avatars.githubusercontent.com/u/534693?v=4)](https://github.com/frankdejonge "frankdejonge (38 commits)")[![bradjones1](https://avatars.githubusercontent.com/u/981966?v=4)](https://github.com/bradjones1 "bradjones1 (24 commits)")[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (10 commits)")[![jotaelesalinas](https://avatars.githubusercontent.com/u/2042875?v=4)](https://github.com/jotaelesalinas "jotaelesalinas (8 commits)")[![RobLoach](https://avatars.githubusercontent.com/u/25086?v=4)](https://github.com/RobLoach "RobLoach (7 commits)")[![hansott](https://avatars.githubusercontent.com/u/3886384?v=4)](https://github.com/hansott "hansott (7 commits)")[![browner12](https://avatars.githubusercontent.com/u/5232313?v=4)](https://github.com/browner12 "browner12 (5 commits)")[![reinink](https://avatars.githubusercontent.com/u/882133?v=4)](https://github.com/reinink "reinink (5 commits)")[![bcrowe](https://avatars.githubusercontent.com/u/752603?v=4)](https://github.com/bcrowe "bcrowe (5 commits)")[![colinodell](https://avatars.githubusercontent.com/u/202034?v=4)](https://github.com/colinodell "colinodell (5 commits)")[![EmanueleMinotto](https://avatars.githubusercontent.com/u/417201?v=4)](https://github.com/EmanueleMinotto "EmanueleMinotto (5 commits)")[![marcqualie](https://avatars.githubusercontent.com/u/101022?v=4)](https://github.com/marcqualie "marcqualie (4 commits)")[![gmponos](https://avatars.githubusercontent.com/u/5675248?v=4)](https://github.com/gmponos "gmponos (4 commits)")[![jclyons52](https://avatars.githubusercontent.com/u/6395559?v=4)](https://github.com/jclyons52 "jclyons52 (3 commits)")[![hassankhan](https://avatars.githubusercontent.com/u/1781985?v=4)](https://github.com/hassankhan "hassankhan (3 commits)")[![vazaha-nl](https://avatars.githubusercontent.com/u/1075085?v=4)](https://github.com/vazaha-nl "vazaha-nl (2 commits)")[![assertchris](https://avatars.githubusercontent.com/u/200609?v=4)](https://github.com/assertchris "assertchris (2 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (2 commits)")[![dragoonis](https://avatars.githubusercontent.com/u/146321?v=4)](https://github.com/dragoonis "dragoonis (2 commits)")

---

Tags

phpmatrixMatrix ChatSynapse

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gestixi-php-matrix-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/gestixi-php-matrix-sdk/health.svg)](https://phpackages.com/packages/gestixi-php-matrix-sdk)
```

###  Alternatives

[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.3M14](/packages/xeroapi-xero-php-oauth2)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[kinde-oss/kinde-auth-php

Kinde PHP SDK for authentication

2369.5k3](/packages/kinde-oss-kinde-auth-php)

PHPackages © 2026

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