voximplant/kit-apiclient-php

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

This package is auto-updated.

Last update: 2024-07-24 23:04:34 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

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