PHPackages                             ottoszika/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ottoszika/php-openfire-restapi

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ottoszika/php-openfire-restapi
==============================

Manage Open fire server using Rest Api

04PHP

Since Oct 24Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (4)Used By (0)

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

[](#php-openfire-restapi)

[![Join the chat at https://gitter.im/gidkom/php-openfire-restapi](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/gidkom/php-openfire-restapi?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Build Status](https://camo.githubusercontent.com/a053747d37983f9542c04e4e7917349165876566bd9ad8532a856ec448694076/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6769646b6f6d2f7068702d6f70656e666972652d726573746170692f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/gidkom/php-openfire-restapi/build-status/master)

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": {
        "gidkom/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);
```

CONTACT
-------

[](#contact)

- gidkom

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7945963?v=4)[Otto Szika](/maintainers/ottoszika)[@ottoszika](https://github.com/ottoszika)

---

Top Contributors

[![gidkom](https://avatars.githubusercontent.com/u/4060499?v=4)](https://github.com/gidkom "gidkom (32 commits)")[![ottoszika](https://avatars.githubusercontent.com/u/7945963?v=4)](https://github.com/ottoszika "ottoszika (2 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/ottoszika-php-openfire-restapi/health.svg)

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

###  Alternatives

[netresearch/composer-patches-plugin

Composer patches plugin

80270.0k10](/packages/netresearch-composer-patches-plugin)[paulzi/yii2-auto-tree

Allow apply multiple tree behavior for ActiveRecord in Yii2

5055.7k6](/packages/paulzi-yii2-auto-tree)[mateffy/pan-analytics-viewer

View your analytics directly where you collect them.

7112.3k](/packages/mateffy-pan-analytics-viewer)

PHPackages © 2026

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