PHPackages                             kapersoft/sharefile-api - 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. kapersoft/sharefile-api

ActiveLibrary[API Development](/categories/api)

kapersoft/sharefile-api
=======================

A minimal implementation of ShareFile Api

1.1.0(8y ago)932.6k19[5 PRs](https://github.com/kapersoft/sharefile-api/pulls)1MITPHPPHP ^7.0CI failing

Since Aug 31Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kapersoft/sharefile-api)[ Packagist](https://packagist.org/packages/kapersoft/sharefile-api)[ Docs](https://github.com/kapersoft/sharefile-api)[ RSS](/packages/kapersoft-sharefile-api/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (3)Dependencies (4)Versions (3)Used By (1)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d36693fb42e9fc81a1d40e57044422a885e7cbd90a03b2a428211465a5db4daf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b61706572736f66742f736861726566696c652d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kapersoft/sharefile-api)[![Build Status](https://camo.githubusercontent.com/adc955784aec7405488a5425c016497b93a85e2f9fefb68bf5589894bbe6cb4d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6b61706572736f66742f736861726566696c652d6170692f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/kapersoft/sharefile-api)[![StyleCI](https://camo.githubusercontent.com/f6da452ab9b57f80e3aeab24175f6364efc1f7c675805354e4b58ee14f186df3/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130313933333033342f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/101933034)[![Quality Score](https://camo.githubusercontent.com/16d6b234c0b037434a3080e9e750d120f03b5218ef5de2603c630fb5b144ef5e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6b61706572736f66742f736861726566696c652d6170692e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/kapersoft/sharefile-api)[![Total Downloads](https://camo.githubusercontent.com/cb8231031d4cd6eff2608d2977c2ce0c7cb5240ddc352a50a8e8cba5d6566eb2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b61706572736f66742f736861726566696c652d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kapersoft/sharefile-api)

A minimal implementation of the ShareFile Api
=============================================

[](#a-minimal-implementation-of-the-sharefile-api)

This is a minimal PHP implementation of the [ShareFile API](https://api.sharefile.com). It contains only the methods needed for my [flysystem-sharefile adapter](https://github.com/kapersoft/flysystem-sharefile). I am open to PRs that add extra methods to the client.

Here are a few examples on how you can use the package:

```
// Connect to ShareFile
$client = new Client('hostname', 'client_id', 'secret', 'username', 'password');

// Create a folder
$newFolder = $client->createFolder($parentId, $name, $description);

// Upload a file in that folder
$client->uploadFileStandard($filename, $newFolder['Id']);

// Get details for a file using filepath
$picture = $client->getItemByPath('/Personal Folders/Pictures/Picture.jpg');

// Using file details we can ask for the thumbnail url
$client->getThumbnailUrl($picture['Id']);

// Or the direct download link
$client->getItemDownloadUrl($picture['Id']);

// Or the contents of the file
$client->getItemContents($picture['Id']);
```

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

[](#installation)

You can install the package via composer:

```
composer require kapersoft/sharefile-api
```

Usage
-----

[](#usage)

The first thing you need to do is get an OAuth2 key. Go to the [Get an API key](https://api.sharefile.com/rest/oauth2-request.aspx) section on the [ShareFile API site](https://api.sharefile.com/) to get this key.

With an OAuth2 key you can instantiate a `Kapersoft\Sharefile\Client`:

```
$client = new Client('hostname', 'client_id', 'secret', 'username', 'password');
```

Look in [the source code of `Kapersoft\ShareFile\Client`](https://github.com/kapersoft/sharefile-api/blob/master/src/Client.php) to discover the methods you can use. More examples can be found in [the source code of `Kapersoft\ShareFile\Test\TestShareFileApi`](https://github.com/kapersoft/sharefile-api/blob/master/tests/TestShareFileApi.php).

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

In the `/tests`-folder are two tests defined:

- `TestClient.php` tests the `Kapersoft\Sharefile\Client`-class using mock Guzzle objects;
- `TestShareFileApi.php` tests the `Kapersoft\Sharefile\Client`-class using the live ShareFile API. To use this test fill in your ShareFile credentials under section `` of the `phpunit.xml.dist`-file in the project root folder. Some tests need additional parameters to run. These parameters can be found in the first lines of the test.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.txt) for more information.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

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

Total

3

Last Release

3168d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b282b144777d8ee6a9f1d468dd4fd44e549e337fee20857af65252fa505aeca?d=identicon)[kapersoft](/maintainers/kapersoft)

---

Top Contributors

[![kapersoft](https://avatars.githubusercontent.com/u/13007854?v=4)](https://github.com/kapersoft "kapersoft (42 commits)")

---

Tags

citrixphpsharefilesharefile-apiphpapisharefilekapersoftsharefile-api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kapersoft-sharefile-api/health.svg)

```
[![Health](https://phpackages.com/badges/kapersoft-sharefile-api/health.svg)](https://phpackages.com/packages/kapersoft-sharefile-api)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

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