voximplant / kit-apiclient-php
Requires
- php: >=7.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
README
Basic description
HTTP API is available via the https://kitapi-{{region}}.voximplant.com/api/v3/{method} endpoint. To use the methods marked with the LOCK symbol, you need to create an api token on api tokens page. Pass this token as access token to each HTTP API call.
Authentication
This API uses Custom Query Parameter for its authentication.
The parameters that are needed to be sent for this type of authentication are as follows:
- access_token
- domain
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/voximplant/kit-apiclient-php.git"
}
],
"require": {
"voximplant/kit-apiclient-php": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/VoximplantKit/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); $config = VoximplantKit\Configuration::getDefaultConfiguration(); $config->setHost('https://kitapi-{{region}}.voximplant.com/api/v3'); // Configure API key authorization: access_token $config->setApiKey('access_token', 'your_access_token'); // Configure API key authorization: domain $config->setApiKey('domain', 'your_domain'); $kitApi = new VoximplantKit\VoximplantKitClient($config); try { $result = $kitApi->AccountApi->getAccountInfo(); print_r($result); } catch (Exception $e) { echo 'Exception when calling $kitApi->AccountApi->getAccountInfo: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://kitapi-{{region}}.voximplant.com/api/v3
Documentation For Models
- AccountDomainPartnerType
- AccountDomainTariffType
- AccountDomainType
- AccountProfileItemType
- AccountProfileType
- AccountType
- AccountUserType
- AppendFailType
- AppendToCampaignResponseType
- AppendToCampaignResponseTypeResult
- AttemptType
- Body
- Body1
- Body2
- Body3
- Body4
- CallerIDType
- CallsHistoryResponseType
- CallsHistoryType
- CallsType
- CampaignStatResponseType
- CampaignStatType
- CampaignType
- DeleteCampaignResponseType
- ErrorResultType
- ErrorType
- ExportHistoryReportResponseType
- ExportStatReportResponseType
- ExportStatReportResponseTypeResult
- GetAccountInfoResponseType
- GetHistoryReportStatusResponseType
- GetListTimezonesResponseType
- GetScenarioVariablesRequestType
- GetScenarioVariablesResponseType
- GetStatReportStatusResponseType
- GetStatReportStatusResponseTypeResult
- GetTimezonesByNumberRequestType
- GetTimezonesByNumberResponseType
- InitCampaignRequestType
- InitCampaignResponseType
- InlineResponse200
- Meta
- PauseCampaignResponseType
- PhoneNumberCampaignType
- PhoneNumberScenarioType
- PhoneNumberType
- ResumeCampaignResponseType
- ScenarioCampaignType
- ScenarioPhoneNumberType
- ScenarioType
- SearchAttemptsResponseType
- SearchCallerIDsResponseType
- SearchCallsResponseType
- SearchCampaignsResponseType
- SearchNumbersResponseType
- SearchScenariosResponseType
- SearchSettingsResponseType
- SettingType
- SettingsType
- StatRequestType
- TestNumberType
- TimezoneByPhoneType
- TimezoneType
- VariablesType
Documentation For Authorization
Authentication schemes defined for the API:
access_token
- Type: API key
- API key parameter name: access_token
- Location: URL query string
domain
- Type: API key
- API key parameter name: domain
- Location: URL query string