PHPackages                             callr/sdk-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. [API Development](/categories/api)
4. /
5. callr/sdk-php

AbandonedLibrary[API Development](/categories/api)

callr/sdk-php
=============

\[DEPRECATED — shutting down 2027-06-30, migrate to Callr REST API v2\] Legacy Callr JSON-RPC API (v1) PHP SDK. See https://docs.callr.com/reference/migrating-from-json-rpc-v1

v0.11.1(9y ago)8430.2k↓59.3%4[1 issues](https://github.com/THECALLR/sdk-php/issues)1MITPHPPHP &gt;=5.4.0

Since Oct 25Pushed 1mo ago12 watchersCompare

[ Source](https://github.com/THECALLR/sdk-php)[ Packagist](https://packagist.org/packages/callr/sdk-php)[ Docs](https://github.com/THECALLR/sdk-php)[ RSS](/packages/callr-sdk-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (6)DependenciesVersions (7)Used By (1)

> ## ⚠️ DEPRECATED — Callr API v1 (JSON-RPC)
>
> [](#️-deprecated--callr-api-v1-json-rpc)
>
> This SDK targets the **legacy Callr JSON-RPC API (v1)**, which is **deprecated** and **will be shut down on 30 June 2027**. After that date this SDK will stop working.
>
> **➡️ Please migrate to the new Callr REST API v2.**
>
> - 📘 **Migration guide (JSON-RPC → REST API v2):**
> - 📣 **What's new in REST API v2:**
> - 🌐 **REST API v2 base URL:** `https://api.callr.com/v2.0`
> - ✉️ **Questions / migration help:**
>
> Your existing API credentials work with REST API v2 — **no new keys required**.
>
> **Official Callr REST API v2 SDKs are coming in the near future.** In the meantime, you can call the REST API directly, or generate a client from the OpenAPI 3.1 spec (see **Generate a REST API v2 client today** below).

---

Generate a REST API v2 client today
-----------------------------------

[](#generate-a-rest-api-v2-client-today)

**An official Callr REST API v2 SDK for PHP is coming soon.** Until then, generate a fully-typed client from the [OpenAPI 3.1 spec](https://api.callr.com/v2.0/openapi.json) with [OpenAPI Generator](https://openapi-generator.tech/) (requires v7.x+ for OpenAPI 3.1):

```
docker run --rm -v "$PWD:/local" openapitools/openapi-generator-cli generate \
  -g php \
  -i https://api.callr.com/v2.0/openapi.json \
  -o /local/callr-v2-php
```

Authenticate with your API Key via the `x-api-key` header (or HTTP Basic: Account SID + API Key). The base URL `https://api.callr.com/v2.0` is baked into the generated client — see its generated `docs/` for the available endpoints.

---

PHP SDK for CALLR API
=====================

[](#php-sdk-for-callr-api)

JSON-RPC 2.0 PHP class, to use with CALLR API.

- **API documentation**:
- **SDK Installation guide**: see INSTALLING.php.md
- **Example projects**:
- **JSON-RPC 2.0 Specification**:
- Easy to use Client class, built for **PHP 5.4+**
- Can be used for both the [API](http://www.callr.com/docs/) and [Real-time](https://www.callr.com/docs/voice/real-time/first-steps) calls
- Requires: `php5-curl`

Composer
--------

[](#composer)

You should use Composer () to manage your PHP dependencies. If you do not have a `composer.json` file yet, create one at the root of your project, download Composer, and launch `composer update`.

The `composer.json` file should look like this:

```
{
  "require": {
    "callr/sdk-php": "^0.11"
  }
}
```

Add all the libraries you need in `composer.json`. Do not forget to run `composer update` each time you edit the file.

Then you just need to include one file in your code:

```
