lonnylot / telnyx-php-sdk
Telnex PHP SDK
Installs: 31
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 3
pkg:composer/lonnylot/telnyx-php-sdk
Requires
- lonnylot/crud-sugar: ^1.0
Requires (Dev)
- phpunit/phpunit: ^8.4
- ramsey/uuid: ^3.9
This package is auto-updated.
Last update: 2025-10-22 01:39:39 UTC
README
This is an SDK for the Telnyx API v2
NOTE Because the v2 API is still in development some of the v1 endpoints will exist in the
\Lonnylot\Telnyx\Legacynamespace.
Installation
Composer
You can install the bindings via Composer. Run the following command:
composer require lonnylot/telnyx-php-sdk dev-master
To use the bindings, use Composer's autoload:
require_once('vendor/autoload.php');
Dependencies
The library requires the CrudSugar library.
Getting Started
This library was made so you can interact with the Telnyx APIs.
Table of Contents
Available Resources
The resources are named as follows:
index- Telnyx "List"show- Telnyx "Retrieve"update- Telnyx "Update"delete- Telnyx "Delete"store- Telnyx "Create"
Available Endpoints
messagingProfilenumberOrdernumberSearchphoneNumberphoneNumberMessagingphoneNumberVoice
Setup Client
Non Laravel
$client = \Lonnylot\Telnyx\Client::getInstance('telnyx'); $client->setApiKey('<your key>');
Laravel
To use with Laravel you need to set your Telnyx API key in app/config/services.php
[ 'telnyx' => [ 'api_key' => env('TELNYX_API_KEY', ''), ] ]
Now you can dependency inject \Lonnylot\Telnyx\Client in your Laravel application and it will be ready to use.
Use Endpoint
To use an endpoint you simply call the endpoint from your client followed by the resource you want to use.
NOTE Keep in mind the resource mapping in the Available Resources section
$client->numberSearch->index(['filter' => ['limit' => 3, 'features' => ['sms', 'mms']]]);