jleehr / canto-saas-api
Client library for Canto SaaS APIs.
3.0.0
2026-06-12 06:00 UTC
Requires
- php: ^8.1
- ext-json: *
- guzzlehttp/guzzle: ^7.5
- psr/log: ^1.1 || ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- phpro/grumphp: ^2.5
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^10.5 || ^11.5 || ^12.0
README
A PHP library to interact with the Canto SaaS API.
This library was originally developed by eCentral
under the package name fairway/canto-saas-api. The original repository is no
longer available; this is the maintained continuation, published as
jleehr/canto-saas-api. The PHP namespace Fairway\CantoSaasApi is kept for
backward compatibility.
Installation
composer require jleehr/canto-saas-api
Example usage
use Fairway\CantoSaasApi\ClientOptions; use Fairway\CantoSaasApi\Client; use Fairway\CantoSaasApi\Http\LibraryTree\GetTreeRequest; $clientOptions = new ClientOptions([ 'cantoName' => 'my-canto-name', 'cantoDomain' => 'canto.de', 'appId' => '123456789', 'appSecret' => 'my-app-secret', ]); $client = new Client($clientOptions); $accessToken = $client->authorizeWithClientCredentials('my-user@email.com') ->getAccessToken(); $client->setAccessToken($accessToken); $allFolders = $client->libraryTree() ->getTree(new GetTreeRequest()) ->getResults();
Security notes
- The
httpClientOptions => ['debug' => true]option passes Guzzle's debug mode through, which writes the complete HTTP traffic — including theAuthorizationheader and OAuth credentials — to STDOUT. Use it for local development only, never in production. If you need custom HTTP behavior, inject a preconfigured client via thehttpClientoption instead. - See SECURITY.md for how to report vulnerabilities.
License
MIT. See LICENSE. Original work © eCentral GmbH.
Trademark notice
Canto is a trademark of Canto, Inc. This package is an independent, unofficial client library and is not affiliated with or endorsed by Canto.