PHPackages                             rbaskam/laravel-pcloud - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. rbaskam/laravel-pcloud

ActiveProject[File &amp; Storage](/categories/file-storage)

rbaskam/laravel-pcloud
======================

1.0.14(3y ago)45102[1 issues](https://github.com/rbaskam/LaravelPCloud/issues)MITPHP

Since Sep 21Pushed 2y ago2 watchersCompare

[ Source](https://github.com/rbaskam/LaravelPCloud)[ Packagist](https://packagist.org/packages/rbaskam/laravel-pcloud)[ GitHub Sponsors](https://github.com/rbaskam)[ RSS](/packages/rbaskam-laravel-pcloud/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (16)Used By (0)

pCloud SDK for Laravel
======================

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

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 rbaskam/laravel-pcloud
```

or add the following to `composer.json` file

```
"require": {
  "rbaskam/laravel-pcloud": "^1.0"
}

```

```

php artisan vendor:publish --provider="Rbaskam\LaravelPCloud\Providers\CustomPCloudServiceProvider" --force

//Add the following to your .env
PCLOUD_CLIENT_ID=[Get this from https://docs.pcloud.com/my_apps/]
PCLOUD_CLIENT_SECRET=[Get this from https://docs.pcloud.com/my_apps/]
PCLOUD_ACCESS_TOKEN=[leave blank]
PCLOUD_LOCATION_ID=[leave blank]

```

---

Generate Auth
-------------

[](#generate-auth)

### Artisan

[](#artisan)

`php artisan laravel-pcloud:token`

### Manual

[](#manual)

Generate Authorize Code, Navigate to below link (Replace CLIENT\_ID with your application Client ID) [https://my.pcloud.com/oauth2/authorize?client\_id=CLIENT\_ID&amp;response\_type=code](https://my.pcloud.com/oauth2/authorize?client_id=CLIENT_ID&response_type=code)

After you get the access code and the hostname, next step is to generate Access Token. \*\*Before you navigate to below link, make sure to replace Client ID, Secret and Access Code &amp; THE HOST NAME (api.pcloud.com) with what was on the page before [https://api.pcloud.com/oauth2\_token?client\_id=xxxxxxxxx&amp;client\_secret=xxxxxxxxx&amp;code=xxxxxxxxx](https://api.pcloud.com/oauth2_token?client_id=xxxxxxxxx&client_secret=xxxxxxxxx&code=xxxxxxxxx)

Copy the access\_token and the locationid to the .env

---

Example
-------

[](#example)

```
use Rbaskam\LaravelPCloud\App;
use Rbaskam\LaravelPCloud\File;
use Rbaskam\LaravelPCloud\Folder;

protected $pCloudApp;

public function __construct()
{
    $this->pCloudApp = new App();
    $this->pCloudApp->setAccessToken(config('laravel-pcloud.access_token'));
    $this->pCloudApp->setLocationId(config('laravel-pcloud.location_id'));
}

// Create Folder instance

$pcloudFolder = new Folder($this->pCloudApp);

// Create new folder in root

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

// Create File instance

$pcloudFile = new File($this->pCloudApp);

// Upload new file in created folder

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

// Get folder content

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

// Get file

$pcloudFile = new File($this->pCloudApp);
$pcloudFile->getLink((int)$fileMetadata->metadata->fileid)

```

### Creating custom requests

[](#creating-custom-requests)

```
use Rbaskam\LaravelPCloud\Request;
use Rbaskam\LaravelPCloud\App;

protected $pCloudApp;

public function __construct()
{
    $this->pCloudApp = new App();
    $this->pCloudApp->setAccessToken(config('laravel-pcloud.access_token'));
    $this->pCloudApp->setLocationId(config('laravel-pcloud.location_id'));
}

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

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

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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

Recently: every ~68 days

Total

15

Last Release

1415d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22d191438a5dd055cfc975abf6259dabec0549580dbee3bb012571e8875c4733?d=identicon)[rbaskam](/maintainers/rbaskam)

---

Top Contributors

[![rbaskam](https://avatars.githubusercontent.com/u/13821245?v=4)](https://github.com/rbaskam "rbaskam (24 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rbaskam-laravel-pcloud/health.svg)

```
[![Health](https://phpackages.com/badges/rbaskam-laravel-pcloud/health.svg)](https://phpackages.com/packages/rbaskam-laravel-pcloud)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M123](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M61](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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