This is a package created to simplify connection requests to the ConnectWise Manage API for Laravel and PHP based applications.
This package is currently in development. Not suggested for production at this time.
- Guzzle 6.3
- Laravel 5.7+
Install the package through composer in your terminal.
composer require taylormaguire/connectwise-manage-api
Add these details to your .env environment file with your own details as appropriate. This package utilizes the ConnectWise Manage Member Authentication method. Details are found here.
Each Environment Variable is REQUIRED for a successful connection.
CW_API_URL=
CW_CLIENT_ID=
CW_API_VERSION=
CW_COMPANY_ID=
CW_API_PUBLIC_KEY=
CW_API_PRIVATE_KEY=
Input your Manage URL. For Cloud or Staging servers you must put "api-" in front of the ConnectWise Manage URL.
https://api-au.myconnectwise.net
https://api-eu.myconnectwise.net
https://api-na.myconnectwise.net
https://api-staging.myconnectwise.net
The Client ID is now required per application as of version 2019.3 of the Manage API. Learn about the Client ID and Generate your applications Client ID here.
Default recommendation is 2019.3 however you can use an older version by changing this environment variable.
Every ConnectWise Manage instance has a Company ID used for login.
The Public Key is a combination of your Company ID and your Public Key. For Example
company+PflTy8uZrw9yLoz6
The Public & Private Keys are generated from inside of the ConnectWise Manage application. For instructions on how to create this account go here.
CW_API_URL=https://api-na.myconnectwise.net
CW_CLIENT_ID=7a3bedaed-73f0-441b-609c-c65e27aa3e12
CW_API_VERSION=2019.3
CW_COMPANY_ID=company
CW_API_PUBLIC_KEY=company+PflTy8uZrw9yLoz6
CW_API_PRIVATE_KEY=da34naA8Cja39aE1
Collect data from the ConnectWise Manage API using the query string parameters provided in the ConnectWise Manage API Documentation. This package will only passthrough keys that are provided by ConnectWise for Query String integrity.
Accepted Query String Parameters can be found here.
Here is an GET Request Example using the Facade
use taylormaguire\CWManageAPI\CWManageAPI;
CWManageAPI::get('company/companies', [
'pageSize' => 30,
'page' => 1,
'orderBy' => 'chargeToId asc',
'fields' => 'id,company/name,status'
]);
The example above will output a query string of
https://api-na.myconnectwise.net/company/companies?pageSize=30&page=1&orderBy=company/name%20%asc&fields=id,company/name,status