voximplant/kit-apiclient-php

v3.0.1 2023-08-24 21:05 UTC

This package is auto-updated.

Last update: 2024-04-24 22:27:11 UTC


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

Class Method HTTP request Description
AccountApi getAccountInfo GET /account/getAccountInfo
AccountApi searchSettings GET /setting/searchSettings
CallsApi downloadHistoryReport POST /calls/downloadHistoryReport
CallsApi exportHistoryReport POST /calls/exportHistoryReport
CallsApi getHistoryReportStatus POST /calls/getHistoryReportStatus
CallsApi searchCalls GET /calls/searchCalls
CampaignsApi appendToCampaign POST /outbound/appendToCampaign
CampaignsApi deleteCampaign POST /outbound/deleteCampaign
CampaignsApi downloadStatReport GET /attempt/downloadStatReport
CampaignsApi exportStatReport POST /attempt/exportStatReport
CampaignsApi getStatReportStatus POST /attempt/getStatReportStatus
CampaignsApi initCampaign POST /outbound/initCampaign
CampaignsApi pauseCampaign POST /outbound/pauseCampaign
CampaignsApi resumeCampaign POST /outbound/resumeCampaign
CampaignsApi searchAttempts GET /attempt/searchAttempts
CampaignsApi searchCampaigns GET /outbound/searchCampaigns
CampaignsApi stat POST /outbound/stat
HelperApi getListTimezones GET /helper/getListTimezones
HelperApi getTimezonesByNumber POST /helper/getTimezonesByNumber
HistoryApi exportCallsHistoryReport POST /history/exportCallsHistoryReport
HistoryApi searchCalls GET /history/searchCalls
NumbersApi searchCallerIDs GET /callerid/searchCallerIDs
NumbersApi searchNumbers GET /phone/searchNumbers
ReportApi downloadReport POST /report/downloadReport
ReportApi getReportStatus POST /report/getReportStatus
ScenariosApi getScenarioVariables POST /scenario/getScenarioVariables
ScenariosApi runScenario POST /scenario/runScenario
ScenariosApi searchScenarios GET /scenario/searchScenarios

Documentation For Models

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

Author