PHPackages                             osavchenko/oauth2-cloudconvert - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. osavchenko/oauth2-cloudconvert

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

osavchenko/oauth2-cloudconvert
==============================

CloudConvert OAuth 2.0 Client Provider for The PHP League OAuth2-Client

0.1.0(4y ago)28MITPHPPHP ^7.4 || ^8.0

Since Sep 17Pushed 4y ago2 watchersCompare

[ Source](https://github.com/osavchenko/oauth2-cloudconvert)[ Packagist](https://packagist.org/packages/osavchenko/oauth2-cloudconvert)[ RSS](/packages/osavchenko-oauth2-cloudconvert/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

CloudConvert Provider for OAuth 2.0 Client
==========================================

[](#cloudconvert-provider-for-oauth-20-client)

[![Source Code](https://camo.githubusercontent.com/ee70ca20f5257542dcc1aa888ec5f4dd4d4c18debd3899f829b610cd4763ada0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d6f7361766368656e6b6f2f6f61757468322d2d636c6f7564636f6e766572742d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/osavchenko/oauth2-cloudconvert)[![Latest Version](https://camo.githubusercontent.com/577da598c4a11bf3ab94c64b6cf20b34e9d72d6a418e39a34a1cbb0f80d738b5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6f7361766368656e6b6f2f6f61757468322d636c6f7564636f6e766572742e7376673f7374796c653d666c61742d737175617265)](https://github.com/osavchenko/oauth2-cloudconvert/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/osavchenko/oauth2-cloudconvert/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/bd1c1ec7d087f30221527fa8c5228b869ca3a28fd7b9dab692772240f42ccf85/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6f7361766368656e6b6f2f6f61757468322d636c6f7564636f6e766572742f43493f6c6162656c3d4349266c6f676f3d676974687562267374796c653d666c61742d737175617265)](https://github.com/osavchenko/oauth2-cloudconvert/actions?query=workflow%3ACI)[![Quality Score](https://camo.githubusercontent.com/5f395cfd8ff180c5aa55a266dce34c24d80101ccdfefeb355d249f1b6e3305ba/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6f7361766368656e6b6f2f6f61757468322d636c6f7564636f6e766572742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/osavchenko/oauth2-cloudconvert)[![Codecov Code Coverage](https://camo.githubusercontent.com/8029ed3f70905ce0440a017aa33fff21303ae445e78703f3b4cdc8f94a85ca65/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f67682f6f7361766368656e6b6f2f6f61757468322d636c6f7564636f6e766572743f6c6162656c3d636f6465636f76266c6f676f3d636f6465636f76267374796c653d666c61742d737175617265)](https://codecov.io/gh/osavchenko/oauth2-cloudconvert)

This package provides [CloudConvert](https://cloudconvert.com/) OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/osavchenko/oauth2-cloudconvert).

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

[](#installation)

To install, use composer:

```
composer require osavchenko/oauth2-cloudconvert

```

Usage
-----

[](#usage)

Usage is the same as The League's OAuth client, using `\Osavchenko\OAuth2\Client\Provider\CloudConvert` as the provider.

### Authorization Code Flow

[](#authorization-code-flow)

```
$provider = new Osavchenko\OAuth2\Client\Provider\CloudConvert([
    'clientId'     => '{cloud-convert-client-id}',
    'clientSecret' => '{cloud-convert-client-secret}',
    'redirectUri'  => 'https://example.com/callback-url',
    'sandbox'      => false, // optional
]);

if (!isset($_GET['code'])) {
    // If we don't have an authorization code then get one
    $authUrl = $provider->getAuthorizationUrl();
    $_SESSION['oauth2state'] = $provider->getState();
    header('Location: '.$authUrl);
    exit;
}

// Check given state against previously stored one to mitigate CSRF attack
if (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
    unset($_SESSION['oauth2state']);
    exit('Invalid state');
}

// Try to get an access token (using the authorization code grant)
$token = $provider->getAccessToken('authorization_code', [
    'code' => $_GET['code']
]);

// Optional: Now you have a token you can look up a users profile data
try {
    // We got an access token, let's now get the user's details
    $user = $provider->getResourceOwner($token);

    // Use these details to create a new profile
    printf('Hello %s!', $user->getNickname());
} catch (Exception $e) {
    // Failed to get user details
    exit('Oh dear...');
}

// Use this to interact with an API on the users behalf
echo $token->getToken();
}
```

### Managing Scopes

[](#managing-scopes)

When creating your CloudConvert authorization URL, you can specify the state and scopes your application may authorize.

```
$options = [
    'state' => 'OPTIONAL_CUSTOM_CONFIGURED_STATE',
    'scope' => ['user.read','task.read'], // array or string
];

$authorizationUrl = $provider->getAuthorizationUrl($options);
```

If neither are defined, the provider will utilize internal defaults.

At the time of authoring this documentation, the [following scopes are available](https://cloudconvert.com/api/v2#authentication).

- user.read
- user.write
- task.read
- task.write
- webhook.read
- webhook.write

Testing
-------

[](#testing)

```
$ ./vendor/bin/phpunit
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/osavchenko/oauth2-cloudconvert/blob/master/LICENSE) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

1695d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/34fe31708b52f480fd6992aef01b775c187a71d47049ad12305f5d9d2fece4f5?d=identicon)[osavchenko](/maintainers/osavchenko)

---

Top Contributors

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

---

Tags

cloudconvertoauthoauth-provideroauth2clientoauthoauth2authorizationauthorisationcloudconvert

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/osavchenko-oauth2-cloudconvert/health.svg)

```
[![Health](https://phpackages.com/badges/osavchenko-oauth2-cloudconvert/health.svg)](https://phpackages.com/packages/osavchenko-oauth2-cloudconvert)
```

###  Alternatives

[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2275.9M27](/packages/stevenmaguire-oauth2-keycloak)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1132.5M6](/packages/patrickbussmann-oauth2-apple)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

251.7M1](/packages/mollie-oauth2-mollie-php)[omines/oauth2-gitlab

GitLab OAuth 2.0 Client Provider for The PHP League OAuth2-Client

36721.5k13](/packages/omines-oauth2-gitlab)

PHPackages © 2026

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