PHPackages                             denchotsanov/pcloud-php-sdk - 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. denchotsanov/pcloud-php-sdk

ActiveLibrary

denchotsanov/pcloud-php-sdk
===========================

pCloud SDK for PHP

v2.3(3y ago)0354MITPHPPHP &gt;=5.6.0

Since Jan 6Pushed 3y agoCompare

[ Source](https://github.com/denchotsanov/pcloud-sdk-php)[ Packagist](https://packagist.org/packages/denchotsanov/pcloud-php-sdk)[ RSS](/packages/denchotsanov-pcloud-php-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (9)Used By (0)

pCloud SDK for PHP
==================

[](#pcloud-sdk-for-php)

A PHP library to access [pCloud API](https://docs.pcloud.com/)

---

Table of Contents
-----------------

[](#table-of-contents)

- [System requirements](#system-requirements)
- [Get started](#get-started)
    - [Register your application](#register-your-application)
- [Install the SDK](#install-the-sdk)
    - [Using Composer](#using-composer)
    - [Manually](#manually)
- [Initializing the SDK](#initializing-the-sdk)
- [Example](#example)

---

System requirements
-------------------

[](#system-requirements)

- PHP 5.6+
- PHP [cURL extension](http://php.net/manual/en/curl.setup.php)

---

Get started
-----------

[](#get-started)

### Register your application

[](#register-your-application)

In order to use this SDK, you have to register your application in [My applications](https://docs.pcloud.com).

---

Install the SDK
---------------

[](#install-the-sdk)

### Using Composer

[](#using-composer)

Install [Composer](http://getcomposer.org/download/).

```
$ composer require denchotsanov/pcloud-php-sdk
```

or add the following to `composer.json` file

```
"require": {
  "denchotsanov/pcloud-php-sdk": "2.*"
}

```

### Manually

[](#manually)

Copy `lib/` folder and include `lib/pCloud/autoload.php` in your code

---

Initializing the SDK
--------------------

[](#initializing-the-sdk)

The SDK uses an OAuth 2.0 access token to authorize requests to the pCloud API. You can obtain a token using the SDK's authorization flow. To allow the SDK to do that, find `App Key`, `App secret` and `Redirect URIs` in your application configuration page and add them to `/example/code.php` and `/example/auth.php`.

Note that `redirect_uri` is optional.

Run `/example/code.php` to get an authorization code and use this code in `/example/auth.php`. This will return `access_token` and `locationid`.

---

Example
-------

[](#example)

```
// Include autoload.php and set the credential file path

$access_token = "ACCESS_TOKEN";
$locationid = 1;

$pCloudApp = new pCloud\App();
$pCloudApp->setAccessToken($access_token);
$pCloudApp->setLocationId($locationid);

// Create Folder instance

$pcloudFolder = new pCloud\Folder($pCloudApp);

// Create new folder in root

$folderId = $pcloudFolder->create("New folder");

// Create File instance

$pcloudFile = new pCloud\File($pCloudApp);

// Upload new file in created folder

$fileMetadata = $pcloudFile->upload("./sample.png", $folderId);

// Get folder content

$folderContent = $pcloudFolder->getContent($folderId);

```

### Creating custom requests

[](#creating-custom-requests)

```
$access_token = "";
$locationid = 1;

$pCloudApp = new pCloud\App();
$pCloudApp->setAccessToken($access_token);
$pCloudApp->setLocationId($locationid);

$method = "userinfo";
$params = array();

$request = new pCloud\Request($pCloudApp);
$response = $request->get($method, $params); // the second argument is optional

```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

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

Total

4

Last Release

1270d ago

Major Versions

v1.0 → v2.12020-08-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/c2f4f1bfa587d96d52b721b0bd352c6870a0dd93d3db773ed0e493ab8203aef3?d=identicon)[denchotsanov](/maintainers/denchotsanov)

---

Top Contributors

[![emanuellandell](https://avatars.githubusercontent.com/u/9020638?v=4)](https://github.com/emanuellandell "emanuellandell (7 commits)")[![denchotsanov](https://avatars.githubusercontent.com/u/27862690?v=4)](https://github.com/denchotsanov "denchotsanov (5 commits)")[![sich](https://avatars.githubusercontent.com/u/1168150?v=4)](https://github.com/sich "sich (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/denchotsanov-pcloud-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/denchotsanov-pcloud-php-sdk/health.svg)](https://phpackages.com/packages/denchotsanov-pcloud-php-sdk)
```

PHPackages © 2026

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