PHPackages                             sysmoh/nextcloud-api-wrapper - 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. sysmoh/nextcloud-api-wrapper

ActiveLibrary[API Development](/categories/api)

sysmoh/nextcloud-api-wrapper
============================

A simple wrapper around nextcloud user provisioning api

0.1.1(8y ago)177.3k↓100%21[3 issues](https://github.com/ovesco/nextcloud-api-wrapper/issues)[4 PRs](https://github.com/ovesco/nextcloud-api-wrapper/pulls)2MITPHP

Since Feb 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ovesco/nextcloud-api-wrapper)[ Packagist](https://packagist.org/packages/sysmoh/nextcloud-api-wrapper)[ RSS](/packages/sysmoh-nextcloud-api-wrapper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (2)

Nextcloud API wrapper for PHP
=============================

[](#nextcloud-api-wrapper-for-php)

This is a simple php wrapper around

- [user provisioning api](https://docs.nextcloud.com/server/12/admin_manual/configuration_user/user_provisioning_api.html)
- [shares api](https://docs.nextcloud.com/server/12/developer_manual/core/ocs-share-api.html)

which allows you to manage your nextcloud instance dynamically. It's meant to be the closest possible to the API, every parameter is available and method names should be understandable enough, dont hesitate to make use of the api documentation seeking help on what params are available for each method.

This library was partially tested with nextcloud 12 and 13. It was developed to fit my needs but I implemented all remaining methods. If you find any bug, don't hesitate to open an issue.

##### Warning

[](#warning)

> Nextcloud API uses basic http auth, which means username and password are not encoded and travel the internet as clearly as possible. Make sure to enforce it using SSL.

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

[](#installation)

Install it with composer

```
composer require sysmoh/nextcloud-api-wrapper

```

Basic usage
-----------

[](#basic-usage)

The library depends on Guzzle to make requests and Symfony's options resolver.

```
use NextcloudApiWrapper\Wrapper;

//The base path to Nextcloud api entry point, dont forget the last '/'
$basePath   = 'http://my.domain.com/nextcloud/ocs/';
$username   = 'admin';
$password   = 'potatoes';

$wrapper    = Wrapper::build($basePath, $username, $password);

// https://docs.nextcloud.com/server/12/admin_manual/configuration_user/user_provisioning_api.html
$userClient                 = $wrapper->getUsersClient();
$groupsClient               = $wrapper->getGroupsClient();
$appsClient                 = $wrapper->getAppsClient();

// https://docs.nextcloud.com/server/12/developer_manual/core/ocs-share-api.html
$sharesClient               = $wrapper->getSharesClient();
$federatedCloudSharesClient = $wrapper->getFederatedCloudSharesClient();

//Instance of \NextcloudApiWrapper\NextcloudResponse
$response   = $userClient->getUsers();
$code       = $response->getStatusCode();   //status code
$users      = $response->getData();         //data as array
$message    = $response->getStatus();       //status message
$guzzle     = $response->getRawResponse();  //Guzzle response
```

### Making your own requests

[](#making-your-own-requests)

If you'd like to perform your own requests, you can use the underlying nextcloud connection class to perform them.

```
$connection = new \NextcloudApiWrapper\Connection($basePath, $username, $password);

//To perform simple requests
$response   = $connection->request('GET', 'cloud/users');

//To perform requests which needs the 'application/x-www-form-urlencoded' header
//and are not performed in POST
$response   = $connection->pushDataRequest('PUT', 'cloud/' . $username . '/disable');

//To perform requests which holds some values to submit
$response   = $connection->submitRequest('POST', 'cloud/users', [
    'userid'    => 'potatoes',
    'password'  => 'tortilla'
]);
```

### Licence

[](#licence)

**MIT**

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity54

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.

###  Release Activity

Cadence

Every ~8 days

Total

2

Last Release

2993d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3736d8e22ebdc8352d96e8e717c424a6c2d00465e8b1b1b5894bf1c461d36e50?d=identicon)[ovesco](/maintainers/ovesco)

---

Top Contributors

[![ovesco](https://avatars.githubusercontent.com/u/8458666?v=4)](https://github.com/ovesco "ovesco (16 commits)")[![kler](https://avatars.githubusercontent.com/u/966132?v=4)](https://github.com/kler "kler (2 commits)")

---

Tags

apinextcloudwrapperapiwrappernextcloud

### Embed Badge

![Health badge](/badges/sysmoh-nextcloud-api-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/sysmoh-nextcloud-api-wrapper/health.svg)](https://phpackages.com/packages/sysmoh-nextcloud-api-wrapper)
```

###  Alternatives

[gabrielbull/ups-api

PHP UPS API

4642.4M10](/packages/gabrielbull-ups-api)[wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

4242.9k](/packages/wtfzdotnet-php-tmdb-api)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)[walle89/swedbank-json

Unofficial API client for the Swedbank's and Sparbanken's mobile apps in Sweden.

752.5k](/packages/walle89-swedbank-json)[lasserafn/laravel-economic

Economic REST wrapper for Laravel

1118.5k](/packages/lasserafn-laravel-economic)[lasserafn/php-dinero

Dinero REST wrapper for PHP

115.2k](/packages/lasserafn-php-dinero)

PHPackages © 2026

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