PHP code example of clever / clever-php
1. Go to this page and download the library: Download clever/clever-php 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/ */
clever / clever-php example snippets
_instance = new Clever\Api\DataApi();
// Note: This is hard coded for demo purposes only. Keep your access tokens secret!
// https://dev.clever.com/docs/security#section-security-best-practices
$api_instance->getConfig()->setAccessToken('TEST_TOKEN');
try {
$result = $api_instance->getStudents();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DataApi->getStudents: ', $e->getMessage(), PHP_EOL;
}