expertsystemsau / transmitsms-php-client
Framework-agnostic PHP client for the TransmitSMS API
Installs: 3
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/expertsystemsau/transmitsms-php-client
Requires
- php: ^8.2
- saloonphp/pagination-plugin: ^2.0
- saloonphp/saloon: ^3.0
Requires (Dev)
- mockery/mockery: ^1.6
- phpunit/phpunit: ^11.0
README
A framework-agnostic PHP client for the TransmitSMS API.
Installation
composer require expertsystemsau/transmitsms-php-client
Usage
use ExpertSystems\TransmitSms\TransmitSmsClient; $client = new TransmitSmsClient('your-api-key', 'your-api-secret'); // Send an SMS $response = $client->sendSms('+61400000000', 'Hello from TransmitSMS!'); // Send to multiple recipients $response = $client->sendSms(['+61400000000', '+61400000001'], 'Bulk message'); // Send with options $response = $client->sendSms('+61400000000', 'Scheduled message', [ 'from' => 'MySenderID', 'send_at' => '2024-12-25 09:00:00', ]); // Check message status $status = $client->getMessageStatus('message-id'); // Get account balance $balance = $client->getBalance(); // Get SMS replies $replies = $client->getSmsReplies(); // Get delivery reports $reports = $client->getDeliveryReports(); // Manage contacts $lists = $client->getLists(); $client->addContact(123, '+61400000000', ['first_name' => 'John']);
Laravel Integration
For Laravel projects, use expertsystemsau/transmitsms-laravel-client which provides a service provider, facade, and notification channel.
License
The MIT License (MIT). Please see License File for more information.