This SDK is not supported by Ubity!
- Swagger: https://generator.swagger.io/?url=https://raw.githubusercontent.com/dansleboby/ubity-sdk-php/master/swagger.json
- Original: https://doc-api-mtl.ubity.com/
The Ubity API allows you to initiate calls, send text messages (SMS), retrieve call recordings, get a user's phone presence status, and a whole lot more.
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.0
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
Then run composer require dansleboby/ubity-sdk-php "~1.0"
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');
$apiInstance = new Swagger\Client\Api\CallsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\AnsweringCallRequest(); // \Swagger\Client\Model\AnsweringCallRequest |
try {
$result = $apiInstance->callAnswerPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CallsApi->callAnswerPost: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: apiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');
$apiInstance = new Swagger\Client\Api\CallsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\HangupCallRequest(); // \Swagger\Client\Model\HangupCallRequest |
try {
$result = $apiInstance->callHangupPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CallsApi->callHangupPost: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: apiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');
$apiInstance = new Swagger\Client\Api\CallsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\CallRequest(); // \Swagger\Client\Model\CallRequest |
try {
$result = $apiInstance->callPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CallsApi->callPost: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: apiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');
$apiInstance = new Swagger\Client\Api\CallsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\SendCallVoiceMailRequest(); // \Swagger\Client\Model\SendCallVoiceMailRequest |
try {
$result = $apiInstance->callSendToVoicemailPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CallsApi->callSendToVoicemailPost: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: apiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');
$apiInstance = new Swagger\Client\Api\CallsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\RunningCallRequest(); // \Swagger\Client\Model\RunningCallRequest |
try {
$result = $apiInstance->callsPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CallsApi->callsPost: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://api.ubity.com
Class | Method | HTTP request | Description |
---|---|---|---|
CallsApi | callAnswerPost | POST /call_answer | Answering a call |
CallsApi | callHangupPost | POST /call_hangup | Hangup a call |
CallsApi | callPost | POST /call | Initiate an outgoing call on behalf of a user. |
CallsApi | callSendToVoicemailPost | POST /call_send_to_voicemail | Send a call to voicemail (while ringing) |
CallsApi | callsPost | POST /calls | List running calls |
ExtensionsApi | extensionsGet | GET /extensions | Get extensions list |
RecordingsApi | recordingPost | POST /recording | Get a specific call recording from and ID |
RecordingsApi | recordingsGet | GET /recordings | Get recordings list |
RecordingsApi | recordingsYearGet | GET /recordings/{year} | Get recordings list for specific year |
RecordingsApi | recordingsYearMonthDayOutGet | GET /recordings/{year}/{month}/{day}/out | Get recordings list for specific for a day (with mp3) |
RecordingsApi | recordingsYearMonthGet | GET /recordings/{year}/{month} | Get recordings list for a specific month |
SmsApi | smsPost | POST /sms | Text Messages (SMS) |
SmsApi | smsSendGet | GET /sms/send | Text Messages (SMS) |
- AnsweringCallRequest
- AnsweringCallResponse
- Call
- CallRequest
- Extension
- ExtensionsList
- HangupCallRequest
- HangupCallResponse
- RecordingList
- RecordingsResponse
- RunningCall
- RunningCallCalls
- RunningCallRequest
- SendCallVoiceMailRequest
- SendCallVoiceMailResponse
- SmsRequest
- SmsResponse
- SmsResponseSms
- SpecificRecordingRequest
- UnAuthorized
- Type: API key
- API key parameter name: key
- Location: URL query string
- Unit test
API: dev@ubity.com SDK: gpaquin@sigp.ca