PHP code example of contactduty / api-client
1. Go to this page and download the library: Download contactduty/api-client 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/ */
contactduty / api-client example snippets
// include your composer dependencies
Api\ContactDutyClient([
'client_id' => '1',
'client_secret' => 'client_secret',
'redirect_uri' => 'http://www.client.com/callback'
]);
$service = new Api\Service\Sms\Service($client);
$service->messages->create(
[
'to' => '+0000000000', //E.164 formatted phone number - https://en.wikipedia.org/wiki/E.164
'message' => 'api call',
'schedule' => '2017-11-10 12:12:12', //optional
'timezone' => 'Europe/London', //optional
'is_recurring' => 0, //optional - 0/1
'recurring_type' => '', //daily/weekly/monthly