PHPackages                             bootdesk/chat-sdk-adapter-telnyx - 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. bootdesk/chat-sdk-adapter-telnyx

ActiveLibrary[API Development](/categories/api)

bootdesk/chat-sdk-adapter-telnyx
================================

Telnyx adapter for bootdesk/chat-sdk-core (SMS, MMS, RCS)

0.4.44(2w ago)0168MITPHPPHP &gt;=8.2

Since Jun 4Pushed 1w agoCompare

[ Source](https://github.com/bootdesk/chat-sdk-adapter-telnyx)[ Packagist](https://packagist.org/packages/bootdesk/chat-sdk-adapter-telnyx)[ RSS](/packages/bootdesk-chat-sdk-adapter-telnyx/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (16)Versions (38)Used By (0)

bootdesk/chat-sdk-adapter-telnyx
================================

[](#bootdeskchat-sdk-adapter-telnyx)

Telnyx adapter for the BootDesk multi-platform messaging SDK. Supports SMS, MMS, and RCS.

Install
-------

[](#install)

```
composer require bootdesk/chat-sdk-adapter-telnyx
```

Requires a PSR-18 HTTP client (`guzzlehttp/guzzle`, `symfony/http-client`, etc.) and a PSR-17 factory (`nyholm/psr7` bundled).

Configuration
-------------

[](#configuration)

VariableDescriptionExample`api_key`Telnyx API V2 Key`KEY...``http_client`PSR-18 HTTP client instance`new GuzzleHttp\Client``messaging_profile_id`Messaging Profile UUID`16fd2706-...``public_key`Ed25519 public key for webhook verification`base64...``from_number`Sender ID — +E.164 phone number, alphanumeric sender ID, or short code`+15551234567`, `MyBrand`, `123456``agent_id`RCS agent ID (enables RCS sending)`e4448a5c...````
use BootDesk\ChatSDK\Telnyx\TelnyxAdapter;

$adapter = new TelnyxAdapter(
    apiKey: env('TELNYX_API_KEY'),
    httpClient: new \GuzzleHttp\Client,
    messagingProfileId: env('TELNYX_MESSAGING_PROFILE_ID'),
    publicKey: env('TELNYX_PUBLIC_KEY'),
    fromNumber: env('TELNYX_FROM_NUMBER'),
    agentId: env('TELNYX_AGENT_ID'),
);
```

### Laravel

[](#laravel)

The `ChatServiceProvider` auto-binds `Psr\Http\Client\ClientInterface` to `GuzzleHttp\Client`. Add to `config/chat.php`:

```
'telnyx' => [
    'api_key' => env('TELNYX_API_KEY'),
    'messaging_profile_id' => env('TELNYX_MESSAGING_PROFILE_ID'),
    'public_key' => env('TELNYX_PUBLIC_KEY'),
    'from_number' => env('TELNYX_FROM_NUMBER'),
    'agent_id' => env('TELNYX_AGENT_ID'),
],
```

Override the HTTP client by setting `http_client` in config or rebinding `ClientInterface` in the container.

Sending Messages
----------------

[](#sending-messages)

The adapter auto-selects the endpoint based on whether `agent_id` is set:

- **No `agent_id`** → `POST /v2/messages` (SMS/MMS via long code, short code, or number pool)
- **With `agent_id`** → `POST /v2/messages/rcs` (RCS with SMS/MMS fallback)

### SMS

[](#sms)

```
$adapter->postMessage(
    'telnyx:+15551234567:+15559876543',
    PostableMessage::text('Hello from BootDesk!')
);
```

### MMS

[](#mms)

```
$adapter->postMessage(
    'telnyx:+15551234567:+15559876543',
    new PostableMessage(
        content: 'Check this out',
        attachments: [['url' => 'https://example.com/photo.jpg']],
    )
);
```

### RCS (text)

[](#rcs-text)

```
$adapter = new TelnyxAdapter(
    apiKey: env('TELNYX_API_KEY'),
    httpClient: new \GuzzleHttp\Client,
    messagingProfileId: env('TELNYX_MESSAGING_PROFILE_ID'),
    agentId: 'e4448a5c...',
    fromNumber: '+15551234567',       // for SMS fallback
);

$adapter->postMessage(
    'telnyx:e4448a5c...:+15559876543',
    PostableMessage::text('Hello via RCS!')
);
```

### RCS (rich card)

[](#rcs-rich-card)

```
use BootDesk\ChatSDK\Core\Cards\Card;
use BootDesk\ChatSDK\Core\Cards\Button;

$card = Card::make()
    ->header('Special Offer')
    ->section(fn ($s) => $s->text('50% off today only'))
    ->image('https://example.com/banner.jpg')
    ->actions([
        Button::primary('Shop Now', 'action_shop'),
        Button::secondary('Dismiss', 'action_dismiss'),
    ]);

$adapter->postMessage(
    'telnyx:e4448a5c...:+15559876543',
    PostableMessage::card($card)
);
```

### RCS fallback

[](#rcs-fallback)

When `from_number` is set and the first RCS message includes `sms_fallback` / `mms_fallback`, Telnyx **may choose to send via SMS/MMS even if the recipient has RCS enabled** — it depends on the carrier's capabilities at that moment. This means you might see RCS-fallback messages delivered as SMS for no apparent reason.

If you need strict RCS-only delivery (e.g., for rich cards, suggestions, or branding), register **two separate Telnyx adapters**:

```
$rcsAdapter = new TelnyxAdapter(
    apiKey: env('TELNYX_API_KEY'),
    httpClient: $client,
    messagingProfileId: env('TELNYX_MESSAGING_PROFILE_ID'),
    fromNumber: env('TELNYX_FROM_NUMBER'),
    agentId: env('TELNYX_RCS_AGENT_ID'),
    // No fromNumber — no fallback, RCS-only
);
$smsAdapter = new TelnyxAdapter(
    apiKey: env('TELNYX_API_KEY'),
    httpClient: $client,
    messagingProfileId: env('TELNYX_MESSAGING_PROFILE_ID'),
    fromNumber: env('TELNYX_FROM_NUMBER'),
    // No agentId — SMS/MMS-only
);

$chat->registerAdapter('rcs', $rcsAdapter);
$chat->registerAdapter('sms', $smsAdapter);
```

Then route based on `$statusData['type'] === 'failed'` in your `onMessageFailed` handler: retry via the SMS adapter.

### RCS delivery reliability

[](#rcs-delivery-reliability)

RCS is a flaky protocol. Even when Telnyx accepts an RCS message (returns 200), the carrier may silently reject it or fail to deliver it. This is returned as a `delivery_failed` status event via `HandlesStatuses`. Key points:

- `delivery_failed` is **normal** and expected — do not treat it as a bug
- Always implement the `onMessageFailed` handler to trigger SMS fallback
- Some carriers/regions have no RCS support at all — all RCS messages will fail there
- Users may have RCS disabled on their device — messages fall back silently
- Read receipts (`message.read`) are **not guaranteed** — some users disable them
- SMS fallback (`from_number`) is recommended for production use

Feature Matrix
--------------

[](#feature-matrix)

FeatureSupportedPost messages✓Edit messages✗Delete messages✗Reactions✗Slash commands✓Typing indicator✗Fetch messages✗Fetch thread info✗Fetch channel info✗Get user✗Open DM✗Stream✓Documentationn
--------------

[](#documentationn)

Full API documentation:

License
-------

[](#license)

MIT

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance97

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

37

Last Release

14d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3874705?v=4)[Vin](/maintainers/tryvin)[@tryvin](https://github.com/tryvin)

---

Top Contributors

[![tryvin](https://avatars.githubusercontent.com/u/3874705?v=4)](https://github.com/tryvin "tryvin (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bootdesk-chat-sdk-adapter-telnyx/health.svg)

```
[![Health](https://phpackages.com/badges/bootdesk-chat-sdk-adapter-telnyx/health.svg)](https://phpackages.com/packages/bootdesk-chat-sdk-adapter-telnyx)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[mollie/mollie-api-php

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

60316.0M89](/packages/mollie-mollie-api-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M425](/packages/drupal-core-recommended)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

36789.4k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

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