PHPackages                             delaneymethod/sharepoint-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. [HTTP &amp; Networking](/categories/http)
4. /
5. delaneymethod/sharepoint-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

delaneymethod/sharepoint-api
============================

A minimal implementation of Sharepoint 2013 REST API

2.0.4(8y ago)314.4k↓66.7%6[1 issues](https://github.com/delaneymethod/sharepoint-api/issues)1MITPHPPHP ^7.0CI failing

Since Apr 3Pushed 4y agoCompare

[ Source](https://github.com/delaneymethod/sharepoint-api)[ Packagist](https://packagist.org/packages/delaneymethod/sharepoint-api)[ Docs](https://github.com/delaneymethod/sharepoint-api)[ RSS](/packages/delaneymethod-sharepoint-api/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (1)

Sharepoint 2013 REST API
========================

[](#sharepoint-2013-rest-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1cf318ee2be00417f8c6f07643d4b912b185de335c382536d8eb9a49968e1fa0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656c616e65796d6574686f642f7368617265706f696e742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/delaneymethod/sharepoint-api)[![Total Downloads](https://camo.githubusercontent.com/0fbddf0777880d03a6ddc86a63f2bad247c72ead6fe325ac40737333bd2e692c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64656c616e65796d6574686f642f7368617265706f696e742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/delaneymethod/sharepoint-api)

This is a minimal PHP implementation of the [Sharepoint 2013 REST API](https://www.dropbox.com/developers/documentation/http/overview). It contains only the methods needed for our flysystem-sharepoint adapter. We are open however to PRs that add extra methods to the client.

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

```
use DelaneyMethod\Sharepoint\Client as SharepointClient;

$siteName = 'YOUR_TEAM_SITE_NAME';
$siteUrl = 'https://YOUR_SITE.sharepoint.com';
$publicUrl = 'https://YOUR_SITE.sharepoint.com/:i:/r/sites/YOUR_TEAM_SITE_NAME/Shared%20Documents'
$clientId = 'YOUR_CLIENT_ID';
$clientSecret = 'YOUR_CLIENT_SECRET';
$verify = false; // See http://docs.guzzlephp.org/en/stable/request-options.html#verify
$accessToken = 'YOUR_ACCESS_TOKEN';

$client = new SharepointClient($siteName, $siteUrl, $publicUrl, $clientId, $clientSecret, $verify, $accessToken);

// Create a folder
$client->createFolder($path);

// Delete a folder
$client->delete($path);

// Upload a file
$client->upload($path, $contents);
```

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

[](#installation)

You can install the package via composer:

```
composer require delaneymethod/sharepoint-api
```

Usage
-----

[](#usage)

The first thing you need to do is get an authorisation token from Sharepoint. Sharepoint has made this very easy. You can register a new App within your Sharepoint Site that can be used to generate a client ID and Secret. You'll find more info at [Authorizing REST API calls against SharePoint Site](http://spshell.blogspot.co.uk/2015/03/sharepoint-online-o365-oauth.html).

You can read the whole article for additional knowledge but the first step is the only step you're interested in for our flysystem-sharepoint adapter to work.

With an authorization token you can instantiate a `DelaneyMethod\Sharepoint\Client`.

Look in [the source code of `DelaneyMethod\Sharepoint\Client`](https://github.com/delaneymethod/sharepoint-api/blob/master/src/Client.php) to discover the methods you can use.

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

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.md) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

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 ~6 days

Total

8

Last Release

2922d ago

Major Versions

1.0.2 → 2.0.02018-04-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/cfb4e92a4d0600764dcbc0058a37dc46627428e876e3bf806e398a5f1ad1f283?d=identicon)[hello@delaneymethod.com](/maintainers/hello@delaneymethod.com)

---

Top Contributors

[![it-mob](https://avatars.githubusercontent.com/u/22001292?v=4)](https://github.com/it-mob "it-mob (1 commits)")[![PHPGuus](https://avatars.githubusercontent.com/u/36767653?v=4)](https://github.com/PHPGuus "PHPGuus (1 commits)")

---

Tags

phpapirestsharepointdelaneymethodsharepoint-api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/delaneymethod-sharepoint-api/health.svg)

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

###  Alternatives

[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.3M14](/packages/xeroapi-xero-php-oauth2)[cybercog/youtrack-rest-php

YouTrack REST API PHP Client.

37149.2k3](/packages/cybercog-youtrack-rest-php)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[ory/hydra-client

Documentation for all of Ory Hydra's APIs.

17435.9k](/packages/ory-hydra-client)[zenditplatform/zendit-php-sdk

PHP client for Zendit API

1204.3k](/packages/zenditplatform-zendit-php-sdk)[whatarmy/fedex-rest

New FedEx Rest API wrapper

2440.5k1](/packages/whatarmy-fedex-rest)

PHPackages © 2026

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