1. Go to this page and download the library: Download pistej/humanity-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pistej / humanity-php-sdk example snippets
use \Humanity\Entity\Company;
use \Humanity\Entity\Employee;
use \Humanity\Humanity;
// Load Humanity SDK for PHP via composer
$config = [
'provider' => [
'clientId' => '...',
'clientSecret' => '...',
'redirectUri' => '...',
'scopes' => [
Company::SCOPE_VIEW,
Employee::SCOPE_VIEW
],
],
];
// Create new instance of humanity class
$humanity = new Humanity($config);