PHP code example of slowprog / calendly-api
1. Go to this page and download the library: Download slowprog/calendly-api 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/ */
slowprog / calendly-api example snippets
alendly\CalendlyApi;
use Calendly\CalendlyApiException;
$calendlyApi = new CalendlyApi('YOUR_API_KEY');
try {
$calendlyApi->echo();
$webhook = $calendlyApi->createWebhook('https://some.site', [
CalendlyApi::EVENT_CREATED,
CalendlyApi::EVENT_CANCELED,
]);
var_dump($webhook['id']);
$webhook = $calendlyApi->getWebhook($webhook['id']);
var_dump($webhook['data'][0]['attributes']['created_at']);
$webhooks = $calendlyApi->getWebhooks();
var_dump(count($webhook['data']));
$calendlyApi->deleteWebhook($webhook['data'][0]['id']);
} catch (CalendlyApiException $e) {
var_dump($e->getMessage());
}