PHPackages                             jungleran/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. [API Development](/categories/api)
4. /
5. jungleran/rocket-chat-rest-client

ActiveLibrary[API Development](/categories/api)

jungleran/rocket-chat-rest-client
=================================

Rocket Chat REST API client in PHP.

v1.1.0(3y ago)04.9kPHP

Since Apr 22Pushed 3y agoCompare

[ Source](https://github.com/jungleran/rocket-chat-rest-client)[ Packagist](https://packagist.org/packages/jungleran/rocket-chat-rest-client)[ RSS](/packages/jungleran-rocket-chat-rest-client/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (3)Used By (0)

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

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

Cloned from fab1en/rocket-chat-rest-client

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

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~1268 days

Total

2

Last Release

1308d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cf4ebd9bedf6084a094cf15d5ca31a08683c6e7f15f0cc7acffc89e8fbea27e?d=identicon)[jungleran](/maintainers/jungleran)

---

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)")[![ranqiangjun](https://avatars.githubusercontent.com/u/5101533?v=4)](https://github.com/ranqiangjun "ranqiangjun (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[asana/asana

A PHP client for the Asana API

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

Client for Balanced API

72372.9k](/packages/balanced-balanced)[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)[slakbal/gotowebinar

GotoWebinar API wrapper for laravel 5+

1513.1k](/packages/slakbal-gotowebinar)

PHPackages © 2026

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