PHPackages                             voximplant/apiclient-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. voximplant/apiclient-php

ActiveLibrary[Image &amp; Media](/categories/media)

voximplant/apiclient-php
========================

Voximplant PHP API client library. Voximplant is a cloud communications platform for business and developers

v3.7.0(1mo ago)960.1k↓75.1%9[1 PRs](https://github.com/voximplant/apiclient-php/pulls)Apache-2.0PHPPHP &gt;= 7.0CI failing

Since May 20Pushed 1mo ago10 watchersCompare

[ Source](https://github.com/voximplant/apiclient-php)[ Packagist](https://packagist.org/packages/voximplant/apiclient-php)[ Docs](https://github.com/voximplant/apiclient-php)[ RSS](/packages/voximplant-apiclient-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (32)Used By (0)

Voximplant API client library
=============================

[](#voximplant-api-client-library)

#### Version 3.7.0

[](#version-370)

Prerequisites
-------------

[](#prerequisites)

In order to use the Voximplant PHP SDK, you need the following:

1. A developer account. If you don't have one, [sign up here](https://manage.voximplant.com/auth/sign_up).
2. A private API key. There are 2 options to obtain it:
    1. Either generate it in the [Voximplant Control panel](https://manage.voximplant.com/settings/service_accounts)
    2. Or call the [CreateKey](https://voximplant.com/docs/references/httpapi/rolesystem#createkey) HTTP API method with the specified [authentication parameters](https://voximplant.com/docs/howtos/integration/httpapi/auth). You'll receive a response with the **result** field in it. Save the **result** value in a file (since we don't store the keys, save it securely on your side).

How to use
----------

[](#how-to-use)

To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:

```
{
  "require": {
    "voximplant/apiclient-php": "*@dev"
  }
}
```

Then run

```
composer install
```

Next, specify the path to the file with the **result** value either in the constructor or using the environment.

**constructor**:

```
$options = (object)[
  'tokenPath' => 'path/to/private/api/key.json',
];
$voxApi = new VoximplantApi($options);
```

**env**:

```
$_ENV['VOXIMPLANT_CREDENTIALS_PATH'] = 'path/to/private/api/key.json';
```

From now on you have access to the SDK methods.

Examples
--------

[](#examples)

### Start a scenario

[](#start-a-scenario)

```
use Voximplant\VoximplantApi;
use Voximplant\Resources\Params\StartScenariosParams;

// Create options
$options = (object)[
  'tokenPath' => 'path/to/private/api/key.json',
];

// Create API Object
$voxApi = new VoximplantApi($options);

/**
 * @param array $params (See below)
 * rule_id - The rule ID.
 * script_custom_data - The script custom data (like a script argument). Can be accessed in JS scenario via the VoxEngine.customData() method
 */
$params = new StartScenariosParams();

$params->rule_id = 1;
$params->script_custom_data = 'mystr';

// Start the scripts from the account.
$result = $voxApi->Scenarios->StartScenarios($params);

// Show result
print_r($result);
```

### Send an SMS

[](#send-an-sms)

```
use Voximplant\VoximplantApi;
use Voximplant\Resources\Params\SendSmsMessageParams;

// Create options
$options = (object)[
  'tokenPath' => 'path/to/private/api/key.json',
];

// Create API Object
$voxApi = new VoximplantApi($options);

/**
 * @param array $params (See below)
 * source - The source phone number.
 * destination - The destination phone number.
 * sms_body - The message.
 */
$params = new SendSmsMessageParams();

$params->source = '447443332211';
$params->destination = '447443332212';
$params->sms_body = 'Test message';

// Send the SMS message with text "Test message" from the phone number 447443332211 to the phone number 447443332212.
$result = $voxApi->SMS->SendSmsMessage($params);

// Show result
print_r($result);
```

### Get a call history item

[](#get-a-call-history-item)

```
use Voximplant\VoximplantApi;
use Voximplant\Resources\Params\GetCallHistoryParams;

// Create options
$options = (object)[
  'tokenPath' => 'path/to/private/api/key.json',
];

// Create API Object
$voxApi = new VoximplantApi($options);

/**
 * @param array $params (See below)
 * from_date - The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss
 * to_date - The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss
 * count - The max returning record count.
 * timezone - The selected timezone or the 'auto' value (will be used the account location).
 */
$params = new GetCallHistoryParams();

$params->from_date = '2012-01-01 00:00:00';
$params->to_date = '2014-01-01 00:00:00';
$params->count = 1;
$params->timezone = 'Etc/GMT';

// Get the first call session history record from the 2012-01-01 00:00:00 UTC to the 2014-01-01 00:00:00 UTC
$result = $voxApi->History->GetCallHistory($params);

// Show result
print_r($result);
```

### Get the transaction history

[](#get-the-transaction-history)

```
use Voximplant\VoximplantApi;
use Voximplant\Resources\Params\GetTransactionHistoryParams;

// Create options
$options = (object)[
  'tokenPath' => 'path/to/private/api/key.json',
];

// Create API Object
$voxApi = new VoximplantApi($options);

/**
 * @param array $params (See below)
 * from_date - The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss
 * to_date - The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss
 * count - The max returning record count.
 * transaction_type - The transaction type list. The following values are possible: periodic_charge, resource_charge, money_distribution, subscription_charge, subscription_installation_charge, card_periodic_payment, card_overrun_payment, card_payment, robokassa_payment, gift, add_money, subscription_cancel, adjustment, wire_transfer, refund.
 * timezone - The selected timezone or the 'auto' value (will be used the account location).
 */
$params = new GetTransactionHistoryParams();

$params->from_date = '2012-01-01 00:00:00';
$params->to_date = '2014-01-01 00:00:00';
$params->count = 3;
$params->transaction_type = array (
    0 => 'gift',
    1 => 'money_distribution',
);
$params->timezone = 'Etc/GMT';

// Get the three transactions record from the 2012-01-01 00:00:00 UTC to the 2014-01-01 00:00:00 UTC with the 'gift' or 'money_distribution' types.
$result = $voxApi->History->GetTransactionHistory($params);

// Show result
print_r($result);
```

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance94

Actively maintained with recent releases

Popularity38

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 55.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~58 days

Recently: every ~53 days

Total

30

Last Release

59d ago

Major Versions

v1.2.0 → v2.0.02023-03-07

v2.14.0 → v3.0.02025-03-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/06b6ab22da8c7cf7e17e9d49d36c99afb0e5d5534bb4a93305666a158c45e73e?d=identicon)[Magomedaliev](/maintainers/Magomedaliev)

![](https://www.gravatar.com/avatar/861e952f927f9f423284e85935013f86af4428d84e07b1c5d20babc607498131?d=identicon)[voximplant](/maintainers/voximplant)

![](https://www.gravatar.com/avatar/c063503783ceb34c87ebda037ae0a4d041f858abaf7ccf50c9fed10e07cd4e4d?d=identicon)[ivaneychik](/maintainers/ivaneychik)

---

Top Contributors

[![AliVox](https://avatars.githubusercontent.com/u/64954338?v=4)](https://github.com/AliVox "AliVox (33 commits)")[![MikhailUtkin](https://avatars.githubusercontent.com/u/48284933?v=4)](https://github.com/MikhailUtkin "MikhailUtkin (25 commits)")[![akvakh](https://avatars.githubusercontent.com/u/7994961?v=4)](https://github.com/akvakh "akvakh (1 commits)")

---

Tags

management-apivoximplantvideosmsmessagingchatcommunicationWebRTCvoicecallvoximplant

### Embed Badge

![Health badge](/badges/voximplant-apiclient-php/health.svg)

```
[![Health](https://phpackages.com/badges/voximplant-apiclient-php/health.svg)](https://phpackages.com/packages/voximplant-apiclient-php)
```

###  Alternatives

[php-ffmpeg/php-ffmpeg

FFMpeg PHP, an Object Oriented library to communicate with AVconv / ffmpeg

5.0k21.7M163](/packages/php-ffmpeg-php-ffmpeg)[opentok/opentok

OpenTok is a platform for creating real time streaming video applications, created by TokBox.

1413.0M10](/packages/opentok-opentok)[telesign/telesign

TeleSign SDK

162.1M2](/packages/telesign-telesign)[signalwire-community/signalwire

Client library for connecting to SignalWire.

23126.2k](/packages/signalwire-community-signalwire)[daun/statamic-mux

Seamless video encoding and streaming using Mux on Statamic sites

132.3k](/packages/daun-statamic-mux)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
