PHPackages                             fab1en/rocket-chat-rest-client - 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. fab1en/rocket-chat-rest-client

ActiveLibrary

fab1en/rocket-chat-rest-client
==============================

Rocket Chat REST API client in PHP.

1.0(9y ago)4983.1k↓42%35[7 issues](https://github.com/Fab1en/rocket-chat-rest-client/issues)[4 PRs](https://github.com/Fab1en/rocket-chat-rest-client/pulls)PHP

Since Apr 6Pushed 5y ago4 watchersCompare

[ Source](https://github.com/Fab1en/rocket-chat-rest-client)[ Packagist](https://packagist.org/packages/fab1en/rocket-chat-rest-client)[ RSS](/packages/fab1en-rocket-chat-rest-client/feed)WikiDiscussions master Synced 1mo ago

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

Rocket Chat REST API client in PHP
==================================

[](#rocket-chat-rest-api-client-in-php)

Use this client if you need to connect to Rocket Chat with a software written in PHP, such as WordPress or Drupal.

How to use
----------

[](#how-to-use)

This Rocket Chat client is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```
{
    "require": {
        "fab1en/rocket-chat-rest-client": "dev-master"
    }
}
```

And run composer to update your dependencies:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

```

Then, import the `autoload.php` from your `vendor` folder.

After this, you have to define some constants to point to your Rocket Chat instance

```
define('REST_API_ROOT', '/api/v1/');
define('ROCKET_CHAT_INSTANCE', 'https://my-rocket-chat-instance.example.org');
```

Finally, instance the classes you need:

```
$api = new \RocketChat\Client();
echo $api->version(); echo "\n";

// login as the main admin user
$admin = new \RocketChat\User('my-admin-name', 'my-admin-password');
if( $admin->login() ) {
	echo "admin user logged in\n";
};
$admin->info();
echo "I'm {$admin->nickname} ({$admin->id}) "; echo "\n";
```

Manage user
-----------

[](#manage-user)

```
// create a new user
$newuser = new \RocketChat\User('new_user_name', 'new_user_password', array(
	'nickname' => 'New user nickname',
	'email' => 'newuser@example.org',
));
if( !$newuser->login(false) ) {
	// actually create the user if it does not exist yet
  $newuser->create();
}
echo "user {$newuser->nickname} created ({$newuser->id})\n";
```

Post a message
--------------

[](#post-a-message)

```
// create a new channel
$channel = new \RocketChat\Channel( 'my_new_channel', array($newuser, $admin) );
$channel->create();
// post a message
$channel->postMessage('Hello world');
```

Credits
-------

[](#credits)

This REST client uses the excellent [Httpful](http://phphttpclient.com/) PHP library by [Nate Good](https://github.com/nategood) ([github repo is here](https://github.com/nategood/httpful)).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 52.9% 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

Unknown

Total

1

Last Release

3329d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2749?v=4)[Fabien Franzen](/maintainers/Fabien)[@fabien](https://github.com/fabien)

---

Top Contributors

[![alekseykuleshov](https://avatars.githubusercontent.com/u/6037974?v=4)](https://github.com/alekseykuleshov "alekseykuleshov (9 commits)")[![Fab1en](https://avatars.githubusercontent.com/u/1143066?v=4)](https://github.com/Fab1en "Fab1en (6 commits)")[![amorev](https://avatars.githubusercontent.com/u/8593411?v=4)](https://github.com/amorev "amorev (2 commits)")

### Embed Badge

![Health badge](/badges/fab1en-rocket-chat-rest-client/health.svg)

```
[![Health](https://phpackages.com/badges/fab1en-rocket-chat-rest-client/health.svg)](https://phpackages.com/packages/fab1en-rocket-chat-rest-client)
```

###  Alternatives

[cpriego/valet-linux

A more enjoyable local development experience for Linux.

1.5k135.9k](/packages/cpriego-valet-linux)[asana/asana

A PHP client for the Asana API

1381.6M4](/packages/asana-asana)[urbanairship/urbanairship

Urban Airship PHP Library

38606.2k2](/packages/urbanairship-urbanairship)[kontent-ai/delivery-sdk-php

Kontent.ai Delivery SDK for PHP

4628.8k](/packages/kontent-ai-delivery-sdk-php)[maksekeskus/maksekeskus-php

Maksekeskus PHP SDK

12179.8k](/packages/maksekeskus-maksekeskus-php)[nlpcloud/nlpcloud-client

NLP Cloud serves high performance pre-trained or custom models for NER, sentiment-analysis, classification, summarization, paraphrasing, grammar and spelling correction, keywords and keyphrases extraction, chatbot, product description and ad generation, intent classification, text generation, image generation, code generation, question answering, automatic speech recognition, machine translation, language detection, semantic search, semantic similarity, tokenization, POS tagging, speech synthesis, embeddings, and dependency parsing. It is ready for production, served through a REST API. This is the PHP client for the API. More details here: https://nlpcloud.com. Documentation: https://docs.nlpcloud.com. Github: https://github.com/nlpcloud/nlpcloud-php

2523.9k](/packages/nlpcloud-nlpcloud-client)

PHPackages © 2026

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