PHPackages                             michaelhull/connectwise-php-client - 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. michaelhull/connectwise-php-client

ActiveLibrary[API Development](/categories/api)

michaelhull/connectwise-php-client
==================================

SPINEN's PHP Client for ConnectWise.

3.1.0(9y ago)014MITPHPPHP &gt;=7

Since Apr 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/michaelhull/connectwise-php-client)[ Packagist](https://packagist.org/packages/michaelhull/connectwise-php-client)[ RSS](/packages/michaelhull-connectwise-php-client/feed)WikiDiscussions develop Synced 3w ago

READMEChangelogDependencies (7)Versions (27)Used By (0)

SPINEN's ConnectWise PHP Client
===============================

[](#spinens-connectwise-php-client)

[![Latest Stable Version](https://camo.githubusercontent.com/69f94160fbc352def79f5dfd57e5d68ff2af3907994f6487c60c73c81b3c057f/68747470733a2f2f706f7365722e707567782e6f72672f7370696e656e2f636f6e6e656374776973652d7068702d636c69656e742f762f737461626c65)](https://packagist.org/packages/spinen/connectwise-php-client)[![Total Downloads](https://camo.githubusercontent.com/25a9eab31887a9f492f5377e3d0745e3557d7786190ca82a7221ceb00281b8eb/68747470733a2f2f706f7365722e707567782e6f72672f7370696e656e2f636f6e6e656374776973652d7068702d636c69656e742f646f776e6c6f616473)](https://packagist.org/packages/spinen/connectwise-php-client)[![Latest Unstable Version](https://camo.githubusercontent.com/4d2c976233cea09ccc374b1a5ae8b34794cce036e9e7f027e5a4295242f06630/68747470733a2f2f706f7365722e707567782e6f72672f7370696e656e2f636f6e6e656374776973652d7068702d636c69656e742f762f756e737461626c65)](https://packagist.org/packages/spinen/connectwise-php-client)[![Dependency Status](https://camo.githubusercontent.com/065569c087f59a4f4bebfc14b91ae938169174120e5f48a33dadb71136b67a01/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f7370696e656e3a636f6e6e656374776973652d7068702d636c69656e742f62616467652e737667)](https://www.versioneye.com/php/spinen:connectwise-php-client)[![License](https://camo.githubusercontent.com/0e8eba1ffcd2139a110452b62b3eba7ad573f9d5f95da994652a0a059afebbdc/68747470733a2f2f706f7365722e707567782e6f72672f7370696e656e2f636f6e6e656374776973652d7068702d636c69656e742f6c6963656e7365)](https://packagist.org/packages/spinen/connectwise-php-client)

PHP client for the RestFull ConnectWise APIs. This package used to be based on the SOAP APIs &amp; had 3 separate repositories, but as of this version there is only this one.

We solely use [Laravel](http://www.laravel.com) for our applications, so there is some Laravel specific files that you can use if you are using this client in a Laravel application. We have tried to make sure that you can use the client outside of Laravel, and have some documentation about it below.

Note about the integration
--------------------------

[](#note-about-the-integration)

We are using the "Member Impersonation" model where you setup an integrator username &amp; password with access to the "Member API", which makes all calls to ConnectWise performed under the permission of the user (member id) of the application.

We make all of our ConnectWise users' member ID equal to their email (i.e.  has a member ID of joedoe in connectwise) \[NOTE: The "." was removed from joe.doe as ConnectWise does not allow dots in the member ID\]. By following this convention, we can infer the member ID from the logged in user's email address in our applications. We have included a trait that you can use on the User model that will preform the logic above.

Laravel Configuration and Usage
-------------------------------

[](#laravel-configuration-and-usage)

### Configuration

[](#configuration)

1. Add the following to `config/services.php`...

```
    'connectwise' =>  [
        'company_id' => env('CW_COMPANY_ID'),
        'integrator' => env('CW_INTEGRATOR'),
        'password' => env('CW_PASSWORD'),
        'url' => env('CW_URL'),
    ],
```

2. Add the appropriate values to your `.env`...

```
CW_COMPANY_ID=
CW_INTEGRATOR=
CW_PASSWORD=
CW_URL=https://
```

3. Add the provider to `config/app.php`

```
'providers' => [
    # other providers omitted
    Spinen\ConnectWise\Laravel\ServiceProvider::class,
],
```

4. \[Optional\] Add the alias to `config/app.php`

```
'aliases' => [
    # other aliases omitted
    'ConnectWise' => Spinen\ConnectWise\Laravel\Facades\ConnectWise::class,
],
```

5. Use the `ConnectWiseMemberIdFromEmail` trait on the User model, which is located at `Spinen\ConnectWise\Laravel\ConnectWiseMemberIdFromEmail`, if your ConnectWise member\_id is a match to your email as described above. If you do not follow that convention, then you can define your own `getConnectWiseMemberIdAttribute` accessor on the User model or just add a `connect_wise_member_id` column to your user table that you populate with the appropriate values.

### Usage

[](#usage)

Here is an example of getting the system information...

As of version 3.1.0, the response is either a Laravel collection of models or a single model. You can see the models in `src/Models`. They all extend `Spinen\ConnectWise\Support`, so you can see the methods that they provide.

```
$ php artisan tinker
Psy Shell v0.8.0 (PHP 7.0.14 — cli) by Justin Hileman
>>> Auth::loginUsingId(1);
PHP warning:  unlink(/Users/jimmy.puckett/git/swaginator.com/storage/framework/sessions/1aMf1yhUe6h4Ij2GRvq5UYab1IqK7GVn1qkyWPY6): No such file or directory in /Users/jimmy.puckett/git/swaginator.com/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php on line 172
=> App\User {#983
     id: "1",
     first_name: "Joe",
     last_name: "Doe",
     email: "joe.doe@domain.tld",
     admin: "0",
     created_at: "2017-01-02 18:30:47",
     updated_at: "2017-01-12 22:22:39",
     logged_in_at: "2017-01-12 22:22:39",
     deleted_at: null,
   }
>>> $cw = app('Spinen\ConnectWise\Api\Client');
=> Spinen\ConnectWise\Api\Client {#934}
>>> $info = $cw->get('system/info');
=> Spinen\ConnectWise\Models\System\Info {#1008}
>>> $info->toArray();
=> [
     "version" => "v2016.6.43325",
     "isCloud" => false,
     "serverTimeZone" => "Eastern Standard Time",
   ]
>>> $info->toJson()
=> "{"version":"v2016.6.43325","isCloud":false,"serverTimeZone":"Eastern Standard Time"}"
>>> $info->isCloud
=> false
>>> $info['isCloud'];
=> false

```

Same call using the facade...

```
$ php artisan tinker
Psy Shell v0.8.0 (PHP 7.0.14 — cli) by Justin Hileman
>>> Auth::loginUsingId(1);
PHP warning:  unlink(/Users/jimmy.puckett/git/swaginator.com/storage/framework/sessions/1aMf1yhUe6h4Ij2GRvq5UYab1IqK7GVn1qkyWPY6): No such file or directory in /Users/jimmy.puckett/git/swaginator.com/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php on line 172
=> App\User {#983
     id: "1",
     first_name: "Joe",
     last_name: "Doe",
     email: "joe.doe@domain.tld",
     admin: "0",
     created_at: "2017-01-02 18:30:47",
     updated_at: "2017-01-12 22:22:39",
     logged_in_at: "2017-01-12 22:22:39",
     deleted_at: null,
   }
>>> ConnectWise::get('system/info');
=> Spinen\ConnectWise\Models\System\Info {#1005}
>>> ConnectWise::get('system/info')->toArray();
=> [
     "version" => "v2016.6.43325",
     "isCloud" => false,
     "serverTimeZone" => "Eastern Standard Time",
   ]
>>> ConnectWise::get('system/info')->toJson();
=> "{"version":"v2016.6.43325","isCloud":false,"serverTimeZone":"Eastern Standard Time"}"
>>> ConnectWise::get('system/info')->isCloud;
=> false
>>> ConnectWise::get('system/info')['isCloud'];
=> false
>>>

```

Non-Laravel Usage
-----------------

[](#non-laravel-usage)

To use the client outside of Laravel, you just need to new-up the objects...

```
$ php -a
Interactive shell

php > // Autoload classes
php > require 'vendor/autoload.php';
php > // New-up objects
php > $token = new Spinen\ConnectWise\Api\Token();
php > $guzzle = new GuzzleHttp\Client();
php > $resolver = new Spinen\ConnectWise\Support\ModelResolver();
php > $client = new Spinen\ConnectWise\Api\Client($token, $guzzle, $resolver);
php > // Now set your configs
php > $token->setCompanyId('')->setMemberId('');
php > $client->setIntegrator('')->setPassword('')->setUrl('https://');
php > $info = $client->get('system/info');
php > var_export($info, false);
Spinen\ConnectWise\Models\System\Info::__set_state(array(
   'casts' =>
  array (
    'version' => 'string',
    'isCloud' => 'boolean',
    'serverTimeZone' => 'string',
  ),
   'attributes' =>
  array (
    'version' => 'v2016.6.43325',
    'isCloud' => false,
    'serverTimeZone' => 'Eastern Standard Time',
  ),
))
php > var_export($info->toArray(), false);
array (
  'version' => 'v2016.6.43325',
  'isCloud' => false,
  'serverTimeZone' => 'Eastern Standard Time',
)
php > var_export($info->tojson(), false);
'{"version":"v2016.6.43325","isCloud":false,"serverTimeZone":"Eastern Standard Time"}'
php > var_export($info->isCloud, false);
false
php > var_export($info['isCloud'], false);
false
php >

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 98.3% 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 ~30 days

Recently: every ~121 days

Total

22

Last Release

3458d ago

Major Versions

2.6.0 → 3.0.02017-01-08

PHP version history (2 changes)2.0.0PHP &gt;=5.4.0

3.0.0PHP &gt;=7

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/990252?v=4)[Michael](/maintainers/michaelhull)[@michaelhull](https://github.com/michaelhull)

---

Top Contributors

[![jimmypuckett](https://avatars.githubusercontent.com/u/3220069?v=4)](https://github.com/jimmypuckett "jimmypuckett (116 commits)")[![michaelhull](https://avatars.githubusercontent.com/u/990252?v=4)](https://github.com/michaelhull "michaelhull (1 commits)")[![ssfinney](https://avatars.githubusercontent.com/u/1596394?v=4)](https://github.com/ssfinney "ssfinney (1 commits)")

---

Tags

clientconnectwisespinen

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/michaelhull-connectwise-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/michaelhull-connectwise-php-client/health.svg)](https://phpackages.com/packages/michaelhull-connectwise-php-client)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M984](/packages/statamic-cms)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[smodav/mpesa

M-Pesa API implementation

16467.9k1](/packages/smodav-mpesa)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1123.7k](/packages/codebar-ag-laravel-docuware)

PHPackages © 2026

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