PHPackages                             hrn4n/php-openfire-restapi - 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. hrn4n/php-openfire-restapi

ActiveLibrary[API Development](/categories/api)

hrn4n/php-openfire-restapi
==========================

Manage Open fire server using Rest Api

07PHP

Since Oct 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/hrn4n/php-openfire-restapi)[ Packagist](https://packagist.org/packages/hrn4n/php-openfire-restapi)[ RSS](/packages/hrn4n-php-openfire-restapi/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

php-openfire-restapi
====================

[](#php-openfire-restapi)

A simple PHP class designed to work with Openfire Rest Api plugin. It is used to remote manage the Openfire server.

LICENSE
-------

[](#license)

php-openfire-restapi is licensed under MIT style license, see LICENCE for further information.

REQUIREMENTS
------------

[](#requirements)

- PHP 5.4+

INSTALLATION
------------

[](#installation)

### With Composer

[](#with-composer)

---

The easiest way to install is via [composer](http://getcomposer.org/). Create the following `composer.json` file and run the `composer.phar` install command to install it.

```
{
    "require": {
        "hrn4n/php-openfire-restapi": "dev-master"
    }
}
```

USAGE
-----

[](#usage)

```
include "vendor/autoload.php";

// Create the Openfire Rest api object
$api = new Gidkom\OpenFireRestApi\OpenFireRestApi;

// Set the required config parameters
$api->secret = "MySecret";
$api->host = "jabber.myserver.com";
$api->port = "9090";  // default 9090

// Optional parameters (showing default values)

$api->useSSL = false;
$api->plugin = "/plugins/restapi/v1";  // plugin

// Add a new user to OpenFire and add to a group
$result = $api->addUser('Username', 'Password', 'Real Name', 'johndoe@domain.com', array('Group 1'));

// Check result if command is succesful
if($result['status']) {
    // Display result, and check if it's an error or correct response
    echo 'Success: ';
    echo $result['message'];
} else {
    // Something went wrong, probably connection issues
    echo 'Error: ';
    echo $result['message'];
}

//Delete a user from OpenFire
$result = $api->deleteUser($username);

//Disable a user
$result = $api->lockoutUser($username);

//Enable a user
$result = $api->unlockUser($username);

/**
 * Update a user
 *
 * The $password, $name, $email, $groups arguments are optional
 *
 */
$result = $api->updateUser($username, $password, $name, $email, $groups)

//Add to roster
$api->addToRoster($username, $jid);

//Delete from roster
$api->addToRoster($username, $jid);

//Update user roster
$api->updateRoster($username, $jid, $nickname, $subscription]);

// Get all groups
$api->getGroup();

// Retrieve group
$api->getGroup($name);

// Create a group
$api->createGroup($group_name, $description);

// Update a group description
$api->updateGroup($group_name, $description);

// Delete a group
$api->deleteGroup($group_name);
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/82a20b2befb90b30e9b381586fcebf02e1455ae9977184549eec596eb1acaca7?d=identicon)[hrn4n](/maintainers/hrn4n)

---

Top Contributors

[![gidkom](https://avatars.githubusercontent.com/u/4060499?v=4)](https://github.com/gidkom "gidkom (32 commits)")[![hernanrz](https://avatars.githubusercontent.com/u/13426225?v=4)](https://github.com/hernanrz "hernanrz (9 commits)")[![emamirazavi](https://avatars.githubusercontent.com/u/3804866?v=4)](https://github.com/emamirazavi "emamirazavi (1 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")

### Embed Badge

![Health badge](/badges/hrn4n-php-openfire-restapi/health.svg)

```
[![Health](https://phpackages.com/badges/hrn4n-php-openfire-restapi/health.svg)](https://phpackages.com/packages/hrn4n-php-openfire-restapi)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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