PHPackages                             r4kib/cloudbeds-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. r4kib/cloudbeds-api

ActiveLibrary[API Development](/categories/api)

r4kib/cloudbeds-api
===================

cloudbeds.com API wrapper for PHP

v0.0.1(6y ago)1119MITPHPCI failing

Since Jul 3Pushed 5y ago3 watchersCompare

[ Source](https://github.com/r4kib/cloudbeds-api)[ Packagist](https://packagist.org/packages/r4kib/cloudbeds-api)[ RSS](/packages/r4kib-cloudbeds-api/feed)WikiDiscussions master Synced 2w ago

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

cloudbeds-api
=============

[](#cloudbeds-api)

Cloudbeds.com API Wrapper for PHP with Laravel Integration

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

[](#installation)

```
composer require r4kib/cloudbeds-api

```

Usage
-----

[](#usage)

### Initializing The Class

[](#initializing-the-class)

```
$cloudbeds = new \R4kib\Cloudbeds\Cloudbeds([
    'clientId'                => 'yourId',          // The client ID assigned to you by Amazon
    'clientSecret'            => 'yourSecret',      // The client password assigned to you by Amazon
    'redirectUri'             => 'yourRedirectUri',  // The return URL you specified for your app on Amazon
    'version'                 => 'v1.1'  // API Version, default v1.1
]);
```

### Initializing The Class (Laravel)

[](#initializing-the-class-laravel)

1. Publish the configuration

```
php artisan vendor:publish --config

```

2. Setup API details in the `.env` file

```
CLOUDBEDS_API_CLIENT_ID=yourId
CLOUDBEDS_API_CLIENT_SECRET=yourSecret
CLOUDBEDS_API_REDIRECT_URI=yourRedirectUri
CLOUDBEDS_API_VERSION=v1.1

```

3. get the singletone

```
$cloudbeds = resolve("R4kib\\Cloudbeds\\Cloudbeds");
```

### OAuth Helper

[](#oauth-helper)

OAuth portion of this implements [thephpleague/oauth2-client](https://github.com/thephpleague/oauth2-client). So for details you should look over there.

```
$oauthHelper= $cloudbeds->getOauthHelper();
// Get authorization code
if (!isset($_GET['code'])) {

    // Get authorization URL
    $authorizationUrl = $oauthHelper->getAuthorizationUrl();

    // Redirect user to authorization URL
    header('Location: ' . $authorizationUrl);
    exit;
} else {
    // Get access token
        $accessToken = $oauthHelper->getAccessToken(
            'authorization_code',
            [
                'code' => $_GET['code']
            ]
        );

    // Get resource owner
        $resourceOwner = $oauthHelper->getResourceOwner($accessToken);

    // Now you can store the results to session etc.
    $_SESSION['accessToken'] = $accessToken;
    $_SESSION['resourceOwner'] = $resourceOwner;

    var_dump(
        $resourceOwner->getID(),
        $resourceOwner->getFirstName(),
        $resourceOwner->getLastName(),
        $resourceOwner->getEmail()
    );
}
```

### Make API request

[](#make-api-request)

```
// $params is [key=>value] array. See cloudbeds.com API documentation to view params.
 $cloudbeds->get('/path',$accessToken,$params);
 $cloudbeds->post('/path',$accessToken,$params);
 $cloudbeds->put('/path',$accessToken,$params);
 $cloudbeds->delete('/path',$accessToken,$params);
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](http://github.com/r4kib/cloudbeds-api/blob/master/LICENSE) for more information.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

2554d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/126093?v=4)[Rakib Rahman](/maintainers/rakib)[@Rakib](https://github.com/Rakib)

---

Tags

apicloudbedsphpphpapiwrappercloudbeds.comcloudbeds

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/r4kib-cloudbeds-api/health.svg)

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

PHPackages © 2026

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